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'
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'