default constraints. | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

default constraints.

does anyone know why the INFORMATION_SCHEMA.TABLE_CONSTRAINTS view doesn’t return default constraints? I look at the source and the value to select the default constraint isn’t part of the query…. Just wondering why these are the only constraints returned.. –snippet from view
when ‘C’ then’CHECK’
when ‘UQ’ then’UNIQUE’
when ‘PK’ then’PRIMARY KEY’
when ‘F’ then’FOREIGN KEY’
SELECT, , FROM sysobjects tab, sysobjects col, syscolumns cols
WHERE = AND = cols.cdefault AND col.xtype = ‘D’ Madhivanan Failing to plan is Planning to fail
I guess there is no real reason for this, The INFORMATION_SCHEMA Views in SQL Server 2000 are not optimal. I’ve heard that this has improved in SQL Server 2005 —
Frank Kalis
Microsoft SQL Server MVP
Heute schon gebloggt?
Ich unterstütze PASS Deutschland e.V.