查找数据库中每个字段的提及
SELECT DISTINCT
o.name AS Object_Name,o.type_desc
FROM sys.sql_modules m
INNER JOIN sys.objects o ON m.object_id=o.object_id
WHERE m.definition Like '%myField%'
ORDER BY 2,1
会在 SProcs,Views 等中找到 myField
的提及
SELECT DISTINCT
o.name AS Object_Name,o.type_desc
FROM sys.sql_modules m
INNER JOIN sys.objects o ON m.object_id=o.object_id
WHERE m.definition Like '%myField%'
ORDER BY 2,1
会在 SProcs,Views 等中找到 myField
的提及