Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find stored procedures by name?

I just need to search through all the stored procedures on my database looking for one that contains "item" in its name. Any ideas?

I've been tinkering around with this, but it's not quite there yet:

SELECT DISTINCT OBJECT_NAME(ID) FROM SysComments WHERE Text LIKE '%Item%'
like image 287
user489041 Avatar asked Sep 07 '11 18:09

user489041


1 Answers

To find those that contain the string "Item" in the name.

select schema_name(schema_id) as [schema], 
       name
from sys.procedures
where name like '%Item%'
like image 192
Martin Smith Avatar answered Oct 07 '22 21:10

Martin Smith