SELECT duplicate records from table

You can use SELECT command for performaing single as well as complax operations depending on requirements.Belo is a simple use of SQL statement for getting duplicate records from database table:-

SELECT *
FROM `<table>`
WHERE  <key>
IN (

SELECT <key>
FROM  <table>
GROUP BY <key>
HAVING count( * ) >1
)
 

Example:-

SELECT *
FROM `demo`
WHERE id
IN (

SELECT id
FROM demo
GROUP BY id
HAVING count( * ) >1
)