双列双主键表

select object_name(id) from (
    select parent_object_id id, count(*) kc from sys.foreign_key_columns a
    group by a.parent_object_id
) r
where r.kc = (select count(*) from sys.columns c where c.object_id = r.id) 

 

posted @ 2023-01-12 13:36  大胡子毛绒老头  阅读(8)  评论(0编辑  收藏  举报