How can I correct this syntax , create rule r1 as @ f <1000 ?
+2
A:
Use a CHECK constraint instead because CREATE RULE is deprecated?
Seriously, I've not used a rule since the 90s
gbn
2010-03-14 18:53:54
A:
You just need to remove the space between the @ and f:
create rule r1 as @f < 1000
You should also consider using a check constraint instead, as Microsoft have indicated that rules will be removed from future versions of SQL Server
Dexter
2010-03-14 18:54:25