_p2scq
Last Updated: February 25, 2016
·
187
· novalagung

SQL - Checking directly to database duplicate rows

sql

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.