“Temukan nama SP melalui teks di SQL Server” Kode Jawaban

Temukan nama SP melalui teks di SQL Server

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
    FROM INFORMATION_SCHEMA.ROUTINES 
    WHERE ROUTINE_DEFINITION LIKE '%Foo%' 
    AND ROUTINE_TYPE='PROCEDURE'
    
SELECT OBJECT_NAME(id) 
    FROM SYSCOMMENTS 
    WHERE [text] LIKE '%Foo%' 
    AND OBJECTPROPERTY(id, 'IsProcedure') = 1 
    GROUP BY OBJECT_NAME(id)
    
SELECT OBJECT_NAME(object_id)
    FROM sys.sql_modules
    WHERE OBJECTPROPERTY(object_id, 'IsProcedure') = 1
    AND definition LIKE '%Foo%'    
Tiny Coders

SQL Temukan teks di SPS

SELECT OBJECT_NAME(id) 
    FROM SYSCOMMENTS 
    WHERE [text] LIKE '%Foo%' 
    AND OBJECTPROPERTY(id, 'IsProcedure') = 1 
    GROUP BY OBJECT_NAME(id)
Kevin Tsumura-Dare

Jawaban yang mirip dengan “Temukan nama SP melalui teks di SQL Server”

Pertanyaan yang mirip dengan “Temukan nama SP melalui teks di SQL Server”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya