从左到右分别是: 外键约束名,子表名,外键列名,父表名
select fk.name fkname , ftable.name ftablename, cn.name fkcol, rtable.name ftablename from sysforeignkeys
join sysobjects fk
on sysforeignkeys.constid = fk.id
join sysobjects ftable
on sysforeignkeys.fkeyid = ftable.id
join sysobjects rtable
on sysforeignkeys.rkeyid = rtable.id
join syscolumns cn
on sysforeignkeys.fkeyid = cn.id and sysforeignkeys.fkey = cn.colid