读书人

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

发布时间: 2012-04-04 16:38:51 作者: rapoo

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' 

读书人网 >SQL Server

热点推荐