Home » Default » SqlServer 查找某个字段在哪个表里

SELECT name
FROM sysobjects
WHERE id IN (
    SELECT id
    FROM syscolumns
    WHERE name = '字段名称'
)


SELECT [name]
FROM [库名].[dbo].sysobjects
WHERE id IN (
    SELECT id
    FROM [库名].[dbo].syscolumns
    WHERE name = '字段名'
)

标签: SqlServer Select

添加新评论

V