title: Is it possible to do multiple SQL select statements within one query? Both select statements would be on the same table
body: <p>This is probably due to my limited SQL knowledge, but I'm attempting to obtain data using a statement like this:</p>
  
  <pre><code>SELECT hostname 
  FROM mytable 
  WHERE hostname NOT LIKE '%obl%' 
      AND group NOT IN ('group1','group2','group3','group4','group5','group6','group7')
      AND osname LIKE '%Windows%' 
      AND hostname NOT LIKE 'nic%'
  </code></pre>
  
  <p>I realize that is probably a very bad statement, but it has worked so far. In the beginning I exclude entries where hostname isn't like "obl". I have another query like this:</p>
  
  <pre><code>SELECT hostname 
  FROM mytable 
  WHERE hostname LIKE '%obl%' 
      AND group IN ('group9','group0')
  </code></pre>
  
  <p>From what I understand, <strong>joins</strong> wouldn't be used in this case, since both queries are on the same table (although my knowledge of joins is very limited). I'm accessing this database via a webservice, and I'm not certain what kind of database it is.</p>
  
  <p>Does anyone have any ideas of how I could get the values from both queries in one query?</p>