Text search in stored proc SQL Server

前端 未结 4 929
[愿得一人]
[愿得一人] 2020-12-17 00:27

Does any one know the script to use for text search in SQL Server? I would like to search a text from all the stored proc inside the SQL Server, does anyone know what is the

4条回答
  •  青春惊慌失措
    2020-12-17 00:52

    Updated: There are several equivalent ways. Here's one:

    SELECT 
        OBJECT_NAME(object_id) 
    FROM 
        sys.sql_modules 
    WHERE 
        Definition LIKE '%searchtext%' 
        AND OBJECTPROPERTY(object_id, 'IsProcedure') = 1 
    

提交回复
热议问题