title: T-SQL List which tables/columns have rules bound to them
body: <p>I have an old SQL Sever database with some rules defined. I can get a list of the rules using:</p>
  
  <pre><code>select name
  from sys.objects so
  where so.type_desc = 'rule'
  </code></pre>
  
  <p>I'm trying to delete each of these rules individually using the following statement:</p>
  
  <pre><code>DROP RULE [dbo].[my_rule]
  </code></pre>
  
  <p>But I'm getting the following error message:-</p>
  
  <blockquote>
    <p>Msg 3716, Level 16, State 1, Line 2<br>
    The rule 'dbo.my_rule' cannot be dropped because it is bound to one or more column.</p>
  </blockquote>
  
  <p>What I need is a T-SQL query to inspect the system tables to give me a list of the columns my rule(s) are bound to. Thanks.</p>