Here I will explain SQL Server query to get a list of stored procedures where table is used or SQL query to get list of procedures which contains table name in SQL Server.
Description:
In previous posts I explained can function return multiple values in SQL Server, Difference between view & stored procedure in SQL, update multiple tables using inner join in SQL Server many articles relating toSQL Server, asp.net, IIS, etc. Now I will explain how to get list procedures which contains particular table in SQL Server.
If we want to get list procedures which contains particular table name we need to write the query like as shown below
SELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%YourTableName%' |
Example Query
SELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%UserInformation%' |
Once we run above query we will get output like as shown below
Output
Name |
searchUserDetails |
No comments:
Post a Comment
Note: only a member of this blog may post a comment.