Last Updated: February 25, 2016
·
314
· novalagung

SQL - Checking directly to database duplicate rows

We can use this query for checking if there was duplicate rows in table.

SELECT l.* FROM tb_post as l, tb_post as r where l.id != r.id and l.title = r.title order by l.title

this query is bad practice for real world application, but useful for checking data directly in database.