To find duplicate values you need to use the MySQL COUNT() function and then pick out all of the counts that are greater than one.
- ORDER BY Count DESC;</pre>
- <p>Conversely you can also select the rows that only have a single entry.</p>
- <pre language=">
- However, it is very nice to pick out the duplicate entries in a table, but you might still need to do something with them. Here is a query to delete any duplicate rows from a table. It does a simple self join and deletes the row value with the lowest ID.