title: Show all rows in MySQL that contain the same value
body: <p>I have a MySQL database:</p>
  
  <pre><code>ID | Name
  1  | Bob
  2  | James
  3  | Jack
  4  | Bob
  5  | James
  </code></pre>
  
  <p>How would I return a list of all the columns where the same name appears more than once, eg, I'd like to return this:</p>
  
  <pre><code>1  | Bob
  2  | James
  4  | Bob
  5  | James
  </code></pre>
  
  <p>I've written a count query:</p>
  
  <pre><code>SELECT Name, COUNT(Name) 
  AS NumOccurrences 
  FROM table 
  GROUP BY Name 
  HAVING ( COUNT(Name) &gt; 1 )
  </code></pre>
  
  <p>But that just returns something like this:</p>
  
  <pre><code>Bob   | 2
  James | 2
  </code></pre>
  
  <p>Whereas I want to return the full rows returned.</p>
  
  <p>Any help would be greatly appreciated, thanks.</p>