はそれが
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 1) column_name, 1 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 1) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 2) column_name, 2 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 2) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 3) column_name, 3 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 3) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 4) column_name, 4 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 4) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 5) column_name, 5 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 5) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 6) column_name, 6 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 6) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 7) column_name, 7 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 7) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 8) column_name, 8 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 8) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 9) column_name, 9 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 9) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 10) column_name, 10 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 10) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 11) column_name, 11 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 11) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 12) column_name, 12 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 12) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 13) column_name, 13 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 13) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 14) column_name, 14 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 14) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 15) column_name, 15 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 15) is not null union
select user_name(o.uid) user_name, object_name(i.id) table_name, index_col(object_name(i.id), i.indid, 16) column_name, 16 column_id, i.name as con_name
from sysindexes i, sysobjects o where object_name(i.id) = 'tbl_pk_mult' and user_name(o.uid) = 'dbo' and status & 2048 = 2048 and i.id = o.id and index_col(object_name(i.id), i.indid, 16) is not null
を行うことができますどのようにしているあなたは、あなたの質問にはいくつかの例で更新することもできます所望の出力(例えば、pk/fk内の列のfk?名のpk?テーブル名の制約名?テーブル名);また、sp_helpconstraint( 'exec sybsystemprocs..sp_helptext sp_helpconstraint null、null、showsql')のソースコードを見てみることをお勧めします。このコードを使用して、制約を表示する独自のSELECTを作成することができます。あなたが望む形式のデータ – markp