DECLARE @SPContent TABLE (SPName sysname , [definition] nvarchar(max))
INSERT INTO @SPContent (SPName,[definition])
SELECT
O.name AS SPName,
SM.[definition]
FROM sys.sql_modules as SM
JOIN sys.objects AS O ON SM.[object_id] = O.[object_id]
WHERE O.type = 'P';
SELECT * FROM @SPContent WHERE [definition] LIKE '%keyword%'
沒有留言:
張貼留言