Returns the locking scheme of the specified object as a string.
lockscheme(object_name)
lockscheme(object_id [, db_id])
is the name of the object that the locking scheme returns. object_name can also be a fully qualified name.
the ID of the database specified by object_id.
the ID of the object that the locking scheme returns.
Selects the locking scheme for the titles table in the current database:
select lockscheme("titles")
Selects the locking scheme for object_id 224000798 (in this case, the titles table) from database ID 4 (the pubs2 database):
select lockscheme(224000798, 4)
Returns the locking scheme for the titles table (object_name in this example is fully qualified):
select lockscheme(tempdb.ownerjoe.titles)
lockscheme returns varchar(11) and allows NULLs.
lockscheme defaults to the current database if you:
Do not provide a fully qualified object_name.
Do not provide a db_id.
Provide a null for db_id.
If the specified object is not a table, lockscheme returns the string “not a table.”
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute lockscheme.