如果是SQL Server,可对需要检查的数据库,执行下述脚本:(例子内是查brand自动在哪些表存)
Select a.name as Columns, b.name as TableName from syscolumns a
left join sysobjects b on a.id = b.id
Where b.type = 'U' and a.name ='brand' order by b.name
b.type = 'U'查的是数据表,如果改成b.type = 'V'则查的是视图
温馨提示:内容为网友见解,仅供参考