title: SQL Column merge and aggregate functions
body: <p>I have a simple table with two columns (well two columns of interest, plus just an ID)... I have an ajax search which is just looking for keywords... which are then sent to my real search... the ajax search doesn't care what they are, but they need to be distinct...</p>
  
  <p>How can I merge the two columns together:</p>
  
  <pre><code>City, Country
  
  Krakow, Poland
  Warsaw, Poland
  Austin, USA
  New York, USA
  Prague, Czech Republic
  </code></pre>
  
  <p>So that I would get</p>
  
  <pre><code>Keyword, Sideinfo
  
  Krakow, Poland
  Warsaw, Poland
  Austin, USA
  Prague, Czech Republic
  USA, Country (only once)
  Poland, Country
  Czech Republic, Country
  </code></pre>
  
  <p>I tried doing a UNION but I'm not sure how i'd do a WHERE LIKE 'keyword%'</p>
  
  <p>Hope that makes sense... </p>