sql对整个数据库结构的常用查询语句
1.查询数据库中某个字段存在哪些表中
Select a.name as columns,b.name as TableName
from syscolumns a
left join sysobjects b
on a.id = b.id
Where a.name ='order_id'
1.查询数据库中某个字段存在哪些表中
Select a.name as columns,b.name as TableName
from syscolumns a
left join sysobjects b
on a.id = b.id
Where a.name ='order_id'