Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

SQL Server Get List of Stored Procedures Where a Table Name is Used

Sep 3, 2013

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.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

4 comments :

MJ said...

nice

Narendran Namachivayam said...

VERY VERY USEFUL INFORMATION,
SAVED MY LOTS & LOTS OF WRITING WORKS.




Narendran N

Unknown said...

wow !!! Finally I got this.....
I was been searching for this since a month !!
Very thank you

Unknown said...

wow working great

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.