T-SQL实用查询之查询字段所属的数据库表

SELECT b.name as TableName,a.name as columnname
From syscolumns a
INNER JOIN sysobjects b ON a.id=b.id
where b.type='U'
AND a.name='destid'

 或者

select * from INFORMATION_SCHEMA.COLUMNS where COLUMN_NAME = 'stuno'

  

posted @ 2018-12-25 13:35  自由的鱼  阅读(366)  评论(0编辑  收藏  举报