What's the default lock granularity in SQL Server?
问题 I've thoroughly read MSDN about table hints and I don't seem to find the locking granularity default. Suppose I have the following query: SELECT TOP (1) * FROM MyTable WITH (UPDLOCK, READPAST) ORDER BY SomeColumn ASC; You see, I specified UPDLOCK and READPAST hints, but not any of granularity hints such as TABLOCK or ROWLOCK . Which granularity lock level is used by default? 回答1: There is no 'default'. The granularity (row, page, (partition | object)) is computed dynamically based on allowed