Jason Clark
Jason Clark

Reputation: 1425

syntax error on SQL Server

I'm receiving this error:

Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '90'.

when i tried to compile this t-sql:

ALTER DATABASE SGCT SET compatibility_level = 90

Does anyone know why?

Upvotes: 1

Views: 64

Answers (2)

Mohit S
Mohit S

Reputation: 14044

Sets certain database behaviors to be compatible with the specified version of SQL Server. You are already using 2005 and 90 is to set for 2005. If you need to do a backward COMPATIBILITY

You should try this.

ALTER DATABASE SGCT 
SET COMPATIBILITY_LEVEL = 80;
GO

Upvotes: 1

Roman Marusyk
Roman Marusyk

Reputation: 24579

For SQL SERVER – 2005 try to use:

EXEC sp_dbcmptlevel AdventureWorks, 80;
GO

More details

Upvotes: 3

Related Questions