Recently I was asked by my colleague to return tha actual value of CHECK constaint that he has defined on the table.
I think it can be usefull for some reports that we've done on the database.
Tested on SQL Server 2000(SP3a) and SQL Server 2005(SP2a)
CREATE TABLE Test
(
col INT,
coldatetime DATETIME
)
ALTER TABLE Test
ADD CONSTRAINT coldatetime_check
CHECK ( coldatetime > '20070101')
SELECT text FROM syscomments
WHERE id =OBJECT_ID('coldatetime_check')
Sunday, March 11, 2007
Subscribe to:
Post Comments (Atom)
1 comment:
Post a Comment