sql server 查询某个字段在哪些表

SELECT OBJECT_NAME(id) objName,
       name AS colName
FROM syscolumns
WHERE (name LIKE 'tickerSymbol')
      AND id IN (
                    SELECT id FROM sysobjects WHERE xtype = 'u'
                )

你可能感兴趣的:(数据库,mysql,sql)