发布网友 发布时间: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')
)