sqlserver在存储过程、函数、视图中查询指定内容
select a.name,definition from sys.all_objects a,
sys.sql_modules b
where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('p')
and definition like '%ProductName%'
order by a.[name] asc
select a.name,definition from sys.all_objects a,
sys.sql_modules b
where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('v')
and definition like '%ProductName%'
order by a.[name] asc
select a.name,definition from sys.all_objects a,
sys.sql_modules b
where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('f')
and definition like '%ProductName%'
order by a.[name] asc
浙公网安备 33010602011771号