SQL Query Analyzer: How can I check database compatability mode?
How can开发者_如何学编程 I check database compatability mode in query analyzer version 8?
Is this SQL Server 2000? If so:
SELECT cmptlevel FROM master..sysdatabases WHERE name = db_name()
For SQL Server 2005 and 2008, as per Mitch Wheat, i.e.:
SELECT compatibility_level
FROM sys.databases
WHERE name = db_name()
In all versions, this works as well:
EXEC sp_dbcmptlevel '{insert name of your database here}'
select compatibility_level
from sys.databases
where name = db_name()
精彩评论