select fk.*
,obj.name --外键名,obj2.name --外键表,obj3.name --主键表from sysforeignkeys fk inner join sysobjects obj on fk.constid=obj.idinner join sysobjects obj2 on fk.fkeyid = obj2.idinner join sysobjects obj3 on fk.rkeyid = obj3.idorder by obj2.name本文共 303 字,大约阅读时间需要 1 分钟。
select fk.*
,obj.name --外键名,obj2.name --外键表,obj3.name --主键表from sysforeignkeys fk inner join sysobjects obj on fk.constid=obj.idinner join sysobjects obj2 on fk.fkeyid = obj2.idinner join sysobjects obj3 on fk.rkeyid = obj3.idorder by obj2.name转载于:https://www.cnblogs.com/LYT731013/p/7544395.html