Set database compatibility level

Oopps! Upgrade your browser pretty please.Oopps! Upgrade your browser pretty please.

Here is how the compatibility level can be set prior to SQL Server 2008:

--SQL Server 2005 database compatible level to SQL Server 2000
EXEC sp_dbcmptlevel AdventureWorks, 80;
GO
--SQL Server 2000 database compatible level to SQL Server 2005
EXEC sp_dbcmptlevel AdventureWorks, 90;
GO

And in SQL Server 2008 the following syntax is available:

ALTER DATABASE database_name
SET COMPATIBILITY_LEVEL = { 80 | 90 | 100 }