Global Variables Disallowed in CHECK and DEFAULT Constraints

SQL Server 6.5

Global variables such as @@SPID cannot be used in CHECK or DEFAULT constraints in either CREATE TABLE or ALTER TABLE statements. This has never been documented as a valid option and is now flagged as invalid syntax, producing error 112:

Variables are not allowed in the CREATE TABLE statement.

Built-in functions continue to work in constraints.