首页 > 技术文章 > sql语句,怎么查看一个表中的所有约束

cbboys 2015-05-10 15:39 原文

sql语句,怎么查看一个表中的所有约束,比如,一个student表,有唯一,外键,主键,用sql语句怎么查看student表中的所有约束呢?

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

推荐阅读