SQL取得表中所有约束,主键等信息
SELECT name,type_desc FROM sys.objects where [type] in ('C','D','F','PK','UQ') and parent_object_id=object_id('tablename')
SQL取得表中所有约束,主键等信息
SELECT name,type_desc FROM sys.objects where [type] in ('C','D','F','PK','UQ') and parent_object_id=object_id('tablename')