sql server查询字段在哪个表

正怒月神 / 2023-07-20 / 原文

select tab.name as tableName,co.name as colName 
from sys.syscolumns co
join sys.tables tab on co.id=tab.object_id
where co.name like '字段名%'