While experimenting with new T-SQL features, I came across a mystery. Here are some of the new syntaxes supported by SQL 2008, and I expect it to work with the databases set for compatibility mode 100 (i.e. 2008), and not work for compatibility mode 80 (i.e. 2000). However, this works for the database set for SQL SERVER 2000 compatibility mode on an instance of SQL 2008 standard version:
use MDS -- this db is compat mode 80 go CREATE TABLE dbo.Employees ( Name VARCHAR(50) NULL, Email VARCHAR(50) NULL, Salary money NULL ) INSERT INTO dbo.Employees(Name, Email, Salary) VALUES('Scott', ' scott@example.com ', 50000.00), ('Jisun', ' jisun@example.com ', 225000.00), ('Alice', ' al@example.com ', 75000.00), ('Sam', ' sam@example.com ', 45000.00) SELECT * FROM dbo.Employees drop table dbo.Employees
source share