title: How to select if any part of an array is contained in an array column in Postgres?
body: <p>I have a table in Postgres that looks like this:</p>
  
  <pre><code>ROW    Fruit
  ----   -----
  1.     {"Candied Apples" , "Oranges"}
  2.     {"Oranges"}
  3.     {"Granny Smith Apples"}
  </code></pre>
  
  <p>I am able to get row #3 that has "Granny Smith Apples" using this query:</p>
  
  <pre><code>SELECT * FROM mytable WHERE Fruit @&gt; '{"Granny Smith Apples"}';
  </code></pre>
  
  <p>What I need to do now is do an array compare, if any of my array is found in the column, I want to return that row.</p>
  
  <p>I tried:</p>
  
  <pre><code>SELECT *  mytable WHERE Fruit @&gt; ANY('{"Oranges","Granny Smith Apples"}');
  </code></pre>
  
  <p>...and I get back no results.  I also tried 'has elements in common', but that's still only giving me back row 2 and not row 1?</p>
  
  <pre><code>SELECT *  mytable WHERE Fruit &amp;&amp; '{"Oranges","Granny Smith Apples"}';
  </code></pre>
  
  <p>I also tried searching for a single value in the array, and that doesn't work either:</p>
  
  <pre><code>SELECT *  mytable WHERE Fruit @&gt; ANY('{"Oranges"}');
  </code></pre>
  
  <p>I get back 0 results.  It only seems to work if I am checking a single value against an array with only 1 value in it - an exact match.</p>
  
  <p>Any ideas what I'm doing wrong?</p>