查找存在某些字段的用户表和视图

来源:互联网 发布:淘宝网自动发货软件 编辑:程序博客网 时间:2024/05/26 09:53
[sql server]
select name,case when xtype='u' then 'usertable' else 'userview' end as xtype
from sysobjects
where id in (
select id from syscolumns where name in('商品编号','商品名称')
) and (xtype='u' or xtype='v')
order by xtype
原创粉丝点击