The lock option provides exclusive controls for retrieving data.
The lock option is specified in the cursor declaration, the cursor specification in a FOR statement, the single-row SELECT statement, or the dynamic SELECT statement.
lock-option::=[{WITH {SHARE|EXCLUSIVE} LOCK
|WITHOUT LOCK [{WAIT|NOWAIT}]}]
[{WITH ROLLBACK|NO WAIT}]
Because WITHOUT LOCK NOWAIT has a different meaning from WITHOUT LOCK NO WAIT, these options must be specified with care.
SELECT PCODE FROM STOCK
WHERE PNAME = N'blouse'
WITH SHARE LOCK
WITH ROLLBACK