8.23 rules
2019-08-25 本文已影响0人
鲸鱼酱375
这个功能在未来可能会被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’