Home > Archive > MS SQL Server > February 2006 > Differ b/w RULE & CONSTRAINT









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Differ b/w RULE & CONSTRAINT
Dutt

2006-02-17, 7:23 am

hi,
Could anybody tell the difference between Rule & Constraint.
Thanks&Regards

David Portas

2006-02-17, 7:23 am

Dutt wrote:
> hi,
> Could anybody tell the difference between Rule & Constraint.
> Thanks&Regards


Rules are a legacy feature that Microsoft has said they will remove
from a future version. It is recommended that you don't use rules, use
check constraints instead. The most obvious difference was that rules
could be bound to user-defined datatypes. User-defined datatypes
(pre-2005 style) are also deprecated.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com