Changing Compatibility of DB

Posted: 08/08/2015 in Tips and Tricks

Whenever we required to test a scenario in lower version of an SQL. Microsoft has provided an option to change the compatibility level of database to achieve it.


Compatibility value and it’s respective versions


Once you have changed the compatibility level of a DB, features available to database is restricted to the compatibility level set to the DB.

As we all know LAG and TRY_CONVERT are introduced in SQL 2012 version, let use see what error SQL shows if we execute these statements.


Ref :


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s