SQL SEVERER 中删除约束

来源:互联网 发布:京东淘宝 编辑:程序博客网 时间:2024/04/29 09:47


1. 查看表的约束名执行
          sp_helpconstraint  表名
结果集中列出了表的约束,constraint_name就是约束名

或者执行
         sp_help  表名
一般这个结果集中constraint_name就表示相应的约束名。 

 2. 在查询分析器里边执行
      alter table 表名 drop constraint 约束名