如题:sql05怎么查看已有数据库的表的约束表达式~急~~

解决方案 »

  1.   

    select * from sys.key_constraints
      

  2.   

    ---查询指定数据库的约束的基本信息
    use 要查询的数据库
    go
    select * from information_schema.table_constraints
      

  3.   

    ---获取指定数据库中的所有表中的约束信息
    use 要查询的数据库
    go
    select * from information_schema.constraint_table_usage
      

  4.   


    具体在那个位置写呢?是在存储过程sys.sp_help查询吗?
      

  5.   


    老大~~没有找到这个sp_helpconstraint存储过程……
      

  6.   

    那你这样,找到你要查看的表-->右键-->编写表脚本为-->CREATE到-->新查询编辑窗口