title: How to find the name of stored procedure, based on table name search, using SQL Server 2008?
body: <p>I want to find all of the stored procedures where a particular table is being used. There are lots of stored procedures in the database, so it's not feasible to check each procedure. </p>
  
  <p>Is there any way to use a search query so that I can find the stored procedures?</p>
  
  <p>I have tried this code:</p>
  
  <pre><code>SELECT distinct so.name
  FROM syscomments sc
  INNER JOIN sysobjects so ON sc.id=so.id
  WHERE sc.TEXT LIKE '% RejectionReason %'
  </code></pre>
  
  <p>Where <code>RejectionReason</code> is my table name, but it shows all procedures where <code>RejectionReason</code> is used as column name, so that doesn't work.</p>