title: WHERE Clause only IF NOT NULL
body: <p>I need help with my <code>SELECT</code>.</p>
  
  <p>I got a field that can be <code>NULL</code> and in it there is stored a foreign-key.</p>
  
  <pre><code>SELECT * FROM beerImage WHERE beerBRewID = brewID AND beerBrandID = beerID &lt;--- this can be NULL
  </code></pre>
  
  <p>So if it's <code>NULL</code> nothing happens.</p>
  
  <p>How can I check if <code>beerID</code> is <code>NOT NULL</code> so I can use <code>"beerBrandID = beerID"</code>?</p>