开发者

About sql server rules

开发者 https://www.devze.com 2022-12-23 09:22 出处:网络
How can I 开发者_JAVA技巧correct this syntax , create rule r1 as @ f <1000 ?Use a CHECK constraint instead because CREATE RULE is deprecated?

How can I 开发者_JAVA技巧correct this syntax , create rule r1 as @ f <1000 ?


Use a CHECK constraint instead because CREATE RULE is deprecated?

Seriously, I've not used a rule since the 90s


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号