Introduction:
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 to SQL
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
|
I
hope it helps you to get list of required stored procedures which contains
particular table name. Happy Coding………
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
4 comments :
nice
VERY VERY USEFUL INFORMATION,
SAVED MY LOTS & LOTS OF WRITING WORKS.
Narendran N
wow !!! Finally I got this.....
I was been searching for this since a month !!
Very thank you
wow working great
Note: Only a member of this blog may post a comment.