Franzbrown,
You can still expect shared locks. I did a query to do a scan of a large
table, but returning no rows, and got:
SELECT * FROM TableName WHERE Column LIKE '%xyz%'
1 - S (Shared) lock
3 - IS (Intent Shared) locks
4 - Sch-S (Schema Stability) locks
SELECT * FROM TableName WITH (NOLOCK) WHERE Column LIKE '%xyz%'
1 - S (Shared) lock
7 - Sch-S (Schema Stability) locks
You can read about the meanings of these locks at:
http://technet.microsoft.com/en-us/library/ms187749.aspx and for more
information http://technet.microsoft.com/en-us/library/ms190615.aspx
RLF
> If I have a select statement that produces no results, what sort of
> locks could it still potentially generate?