Why does new T-SQL of SQL Server 2008 work on database in compatability mode 80? -
experimenting new features of t-sql, i've run puzzle. here new syntax supported sql 2008 , i'd expect work on databases set compatibility mode 100 (i.e. 2008) , not work compat mode 80 (i.e. 2000). yet works database set sql server 2000 compatibility mode on sql 2008 instance of standard edition:
use mds -- db compat mode 80 go create table dbo.employees ( name varchar(50) null, email varchar(50) null, salary money null ) insert 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 * dbo.employees drop table dbo.employees
the compatibility mode setting used control relatively obscure (imho) aspects of databae engine behavior. not block or prevent use of extensions t-sql language being used on databases migrated prior versions--for example, database backed sql 2000 , restored on sql 2008 support ctes , new multi-value insert statements.
the actual details of controlled database compatibility mode buried in several articles in books online; this starting place researching this.
Comments
Post a Comment