Finding Database Compatibility Level - SQL Server

select compatibility_level from sys.databases where name = db_name()