SQL语句查询表中的所有约束

select * from sysobjects where parent_obj in(select id from sysobjects where name='表名')

或者

exec sp_helpconstraint @objname='表名'

原文地址:https://www.cnblogs.com/daryl/p/6676706.html