title: How to remove duplicate rows in MySQL?
body: <p>I tried to remove duplicate rows from a table TT</p>
  <p>here is my query</p>
  <pre><code>delete t1 
    from TT t1
       , TT t2 
   where t1.id &lt; t2.id 
     and t1.url = t2.url
  </code></pre>
  <p>Here id is the primary key and url has the unique key in the table TT. You must be wondering why there are duplicate rows with unique index?</p>
  <p>Actually it did happen and I don't know why but right now I want to remove the duplicate rows first. I am able to run the query in phpmyadmin but no duplicate rows are deleted at all(There is duplicate rows in the Table TT).</p>
  <p>What could be the reason? Thanks!</p>