查询sql server2005 数据库中主键为“FLOWNO” 的表

发布网友 发布时间:1天前

我来回答

1个回答

热心网友 时间:7分钟前

select name from sysobjects
where id in
(select id from syscolumns where name = 'FLOWNO')

这是查询包含字段FLOWNO的表名
至于主键,我还没查到
-------------------------------------------

用这个
select name from sysobjects where id in
(
select id from sysindexes
where name in
(select name from sysobjects where xtype='PK')
and id in
(select id from syscolumns where name = 'FLOWNO')
)

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com