title: SQL WHERE clause - multiple conditions
body: <p>I can't seem to get my syntax correct. The following query using pyodbc in Python v3.9 works.</p>
  <pre><code>SELECT name, state_desc FROM sys.databases WHERE (name!= ('master')) AND (state_desc= 'offline')&quot;
  </code></pre>
  <p>What I want to do in the WHERE condition is include the tempbd, model and msdb DBs along with the master DB. For example (but does not work):</p>
  <pre><code>SELECT name, state_desc FROM sys.databases WHERE (name!= ('master', 'tempdb')) AND (state_desc= 'online')&quot;
  </code></pre>
  <p>I've tried many different ways but just can't get it.</p>
  <p>Any suggestions?</p>