美文网首页
8.23 rules

8.23 rules

作者: 鲸鱼酱375 | 来源:发表于2019-08-25 21:51 被阅读0次

这个功能在未来可能会被sql server取消,官网建议用check constraint功能作为代替了

1. rules

  • Rules are cousins to constraints
  • Rules are created as a general constraint to be applied to various tables
  • Used instead of creating individual constraints for each table

2.How to Use Rules

  • Rules are created in their own syntax using a create statement
Create Rule RuleName�as�<Expression>

After rules are created, they must be bound to a column in a table
1 rule per column in a table

Sp_bindrule RuleName,�‘TblName.Column’

相关文章

网友评论

      本文标题:8.23 rules

      本文链接:https://www.haomeiwen.com/subject/vbffectx.html