Write a query to find duplicate rows in table?



Write a query to find duplicate rows in table?..

Answer / Ramayan Prasad Mishra

To find duplicate rows in MySQL, you can use the following query: SELECT * FROM table WHERE id IN (SELECT min(id) FROM table GROUP BY column1 HAVING COUNT(*) > 1); Replace 'table' with your actual table name and 'column1' with the column that you want to compare for duplicates.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What's the latest version of mysql?

1 Answers  


How to extract a unit value from a date and time?

1 Answers  


Query to select passwords from a table having a column "Password" Whose length is b/w 8 &15 and having 'A' as the first character in the password irrespective of case.

3 Answers  


what is the procedure to configure the application of mysql?

1 Answers  


What is field in mysql?

1 Answers  


What is the maximum number of records in mysql table?

1 Answers  


In which format data is stored in mysql database?

1 Answers  


how we connect the data base in any programme

2 Answers  


How MySQL is different from SQL?

17 Answers   HCL, IBM,


how to Return total number of rows.

1 Answers  


What is the difference between mysql_fetch_assoc and mysql_fetch_array?

1 Answers  


Can mysql store files?

1 Answers  


Categories