在2000中可以用右键新建规则,可是2005中没有新建规则呢?

解决方案 »

  1.   

    展开数据库--》》可编程性-->>规则
      

  2.   

    只能用SqL语言建,然后关联。在2000中只是多了个界面,在2005就直接用sQL写吧,生成规则后在规则文件夹中能看到的
      

  3.   

    不建议使用规则..建议使用CHECK约束.
      

  4.   

    create table tb(id int,up_id int)
    go
    CREATE RULE rule_name as
    @range>=0 AND @range <=5000
    go
    Sp_bindrule 'rule_name', 'tb.up_id'
    go
    Sp_unbindrule 'tb.up_id'
    go
    drop rule rule_name
    go
    drop table tb
    在规则绑定后可到"可编程性"-"规则"中查看依赖关系.