Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver,microsoft.public.sqlserver.programming Subject: Re: SSE 2008: Check Clause Question Followup-To: comp.databases.ms-sqlserver Date: Tue, 12 Jul 2011 23:56:34 +0200 Organization: Erland Sommarskog Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="DD6dU+BfJNjsjSP4/K/V7w"; logging-data="7190"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6Fw5/NZfJ/Dm8ElCezf/m" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:lTTHCZqKOv6HhbZ8YxKuKUc67qQ= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:503 Gene Wirchenko (genew@ocis.net) writes: > Is there any way around the SQL glitch that a check condition > will always succeed when the table is empty? > > I do not want to have the first row be automatically accepted. Not sure what you mean. If the table is empty, there is nothing to enforce. That does not mean if you add a row, that anything will be accepted. Could you clarify? -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx