An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
April 5, 2022 05:14 am GMT
Original Link: https://dev.to/coderallan/sql-quick-tip-7-find-stored-procedures-2jdb
SQL-Quick tip 7 - Find stored procedures
Sql Server tips and tricks
This is part of a series of quick tips and tricks I have accumulated over the year, that I think can be useful for others.
If you have similar short tips and tricks please leave a comment.
Find stored procedure
When working on large databases there can in some project be hundreds or even thousands of stored procedures, so if your task is to find all stored procedures that query a specific table then finding it could be quite a headache.
This query below has helped me many times and I hope it will help you too.
DECLARE @searchText VARCAHR(200) = 'customer'SELECT name AS [Stored procedure name] FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%'+ @searchText +'%' AND [type]='P' ORDER BY name
Original Link: https://dev.to/coderallan/sql-quick-tip-7-find-stored-procedures-2jdb
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To