当前位置: 代码迷 >> Sql Server >> SQL2000 查看 所有 外键,该怎么解决
  详细解决方案

SQL2000 查看 所有 外键,该怎么解决

热度:495   发布时间:2016-04-27 13:43:03.0
SQL2000 查看 所有 外键
SQL2000 查看 所有 外键

我现在只知道进企业管理器,然后点右键---表--设计--管理关系。 但这样只能一个个看,有没有什么列表,就像表、存储过程,函数一样。

------解决方案--------------------
SQL code
--查看指定表select * from sysobjects where parent_obj in(select id from sysobjects where name='表名')and xtype='PK'--查看所有表select * from sysobjects where xtype='PK'
------解决方案--------------------
select Object_name(parent_obj) 表名,Name 外键名
From sysObjects a
where xtype='f'
------解决方案--------------------
SQL code
select * from sysobjects where xtype='PK'
  相关解决方案