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.

Com_level1

Compatibility value and it’s respective versions

Com_level2

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.

Com_level3

Ref : https://msdn.microsoft.com/en-in/library/bb510680.aspx

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s