The syntax for rules in SQL Server 2005 is given:
CREATE RULE [ schema_name . ] rule_name
AS condition_expression
Whenever using rule, for example:
CREATE RULE list_rule
AS
@list IN ('1389', '0736', '0877');
Why are we using a variable like @list in it? It doesn't correspond to the table name or anything.
Is that used for storing the values given in the IN statement or anything else?
I just need an explanation for this. I know that rules are now deprecated but I am using SQL Server 2005.
RULErather than use aCHECKconstraint? – Paul White Dec 1 '12 at 5:02