826

导航

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'

posted on 2014-01-02 10:22  826  阅读(231)  评论(0编辑  收藏  举报