Search text into Stored Procedures or User Defined Function SQL
Il seguente snippet mostra come ricercare un testo all’interno di Stored Procedure o Function presenti nel database.
Ad esempio, supponiamo di voler ricercare in quali Stored Procedure oppure in quali User Defined Funcion è utilizzata la tabella "Employees".
E’ sufficiente eseguire la seguente query:
SELECT name AS NOME_OGGETTO, text AS DEFINIZIONE, type AS TIPO FROM sysobjects SO INNER JOIN syscomments SC ON SO.id = SC.id WHERE text LIKE '%Employees%' ORDER BY name
Lascia un commento