查詢欄位 ( 全資料表查詢 )

SELECT t.name AS table_name,

SCHEMA_NAME(schema_id) AS schema_name,

c.name AS column_name

FROM sys.tables AS t

INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID where C.name like '%你想找的欄位%'

ORDER BY schema_name, table_name 


直接複製貼上即可