title: SQL -- Assigning a bit variable in select statement
body: <p>For example:</p>
  
  <pre><code>declare @bitHaveRows bit
   select @bitHaveRows = count(*)
     from table
    where (predicate)
  </code></pre>
  
  <p>Are there any functions I can call on this line:</p>
  
  <pre><code>select @bitHaveRows = count(*)
  </code></pre>
  
  <p>to assign this bit a value of 0 if there are no rows, or 1 if there are one or more rows?</p>