title: Delete Duplicate rows from Mysql table and Kept only one row
body: <p>I want to delete all duplicate rows from Mysql table.<br>
  But problem is that I did not know which rows are duplicate.<br>
  This Mysql table contain a large data round about 500000 rows.<br>
  In which some rows are duplicate.<br>
  Please guide me how can I do this.  </p>
  
  <p><strong>UPDATE:</strong>  </p>
  
  <p>I need SQL query which I run in phpMyAdmin.<br>
  Here is a rough table to understand.<br>
  Suppose table name is <strong>foo</strong>.  </p>
  
  <pre><code>+---------------------------------------------------------------------+
  | id |   link  |     title              |  description                |
  +---------------------------------------------------------------------+
  | 1  |  google |     search engine      |  search here free           |  
  | 2  |  yahoo  |    also search engine  | findout web easily          |  
  | 3  | Facebook|  connect with world    | meet with world             |  
  | 4  | google  |  search engine         |  search here free           |
  | 5  | msn     | Microsoft network      | network by MS               |
  | 6  | google  | search engine          |  search here free           |
  | 7  | msn     | Microsoft network      | network by MS               |
  | 8  | yahoo   |  also search engine    | findout web easily          |
  | 9  | myweb   |  my website            | ideal website               |
  |... | ....    | .....continue....      | ..... ... .....             |
  +---------------------------------------------------------------------+   
  </code></pre>
  
  <p>This is a rough table I can not define my table fully because it had round about 500000<br>
  rows.Hope this understand you what I want.<br>
  I rough query like that.  </p>
  
  <pre><code>DELECT all duplicate rows FROM foo
  </code></pre>
  
  <p><strong>EDIT</strong><br>
        I see this questoin is marked as duplicate.But I think it is unique.The link with this you compare it dulpicate.I see this link and there is answer which is marked for usefull for small size table it make changes in index and make unique index. Here is the code of that  </p>
  
  <pre><code>  ALTER IGNORE TABLE jobs ADD UNIQUE INDEX idx_name (site_id, title, company );  
  </code></pre>
  
  <p>If you run this query after this when ever you add any data Mysql check out that it is already present or not if present it stop to adding this.<br>
  I already told you that my table is contaning a large data if use this query and after that 
  I add one result in my table it check my whole table in which round about 500000 rows for make it uniquness this make it slow.It is only one new record if this is 10 or Whats your idea about if I want to enter 100000 new records it make too slower it.<br>
  And I see other answer most of them are containing <code>HAVING</code> class.It is already slow.</p>