dbTalk Databases Forums  

SSE 2008: Check Clause Question

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss SSE 2008: Check Clause Question in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
--CELKO--
 
Posts: n/a

Default Re: SSE 2008: Check Clause Question - 07-16-2011 , 08:46 AM






The way you get around this in ANSI/ISO Standard SQL is with the
CREATE ASSERTION statement. It is a CHECK() done at the schema level
instead of the table level. That is why CONSTRAINT names are globla
and noyt local to their table.

CREATE ASSERTION NotEmpty
CHECK ((SELECT COUNT(*) FROM Foobar) > 0);

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.