首页 > 代码库 > 查询sqlserver数据库视图、存储过程等包含特定的字符串

查询sqlserver数据库视图、存储过程等包含特定的字符串

?
1
2
3
4
5
6
SELECT  A.name ,
        B.definition
FROM    SYS.objects A
        INNER JOIN sys.sql_modules B ON A.object_id = B.object_id
                                        AND ( CHARINDEX(‘包含字符‘,
                                                        B.definition) > 0 )