Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the way to ALTER the compatability level but I can't seem to find the right query to get what it is now before I do that.

What I have tried:

'Have tried not to to feel so helpless
Posted
Updated 14-Feb-17 17:47pm

Got it,
SELECT compatability_level FROM sys.database

Thanks anyway.
 
Share this answer
 
Execute the following query to view the compatibility level of a database
SQL
USE AdventureWorks2012;  
GO  
SELECT compatibility_level  
FROM sys.databases WHERE name = 'AdventureWorks2012';  
GO

And to change the compatibility level of a database execute
SQL
ALTER DATABASE AdventureWorks2012  
SET COMPATIBILITY_LEVEL = 120;  
GO

If someone want to know more about compatibility level, visit: Understanding SQL Server Database Compatibility Level Performance[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900