Execute the following query to view the compatibility level of a database
USE AdventureWorks2012;
GO
SELECT compatibility_level
FROM sys.databases WHERE name = 'AdventureWorks2012';
GO
And to change the compatibility level of a database execute
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[
^]