How to retrieve Duplicate Rows only in a Table?
Suppose if a Table Name is "Education". It consists of
multiple columns. Then if we insert rows into this table
with duplicate records then how can we retrieve only
duplicate records from that table?

Answer Posted / aravind

select SPAN_UUID, SPAN_UNIT_UUID, count(*) from
SPAN_SPAN_UNIT group by SPAN_UUID, SPAN_UNIT_UUID having
count(*) > 1;

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I save the results of sql query in a file?

531


How to know the last executed procedure?

584


What are string functions in sql?

671


What is structural independence and why is it important?

542


What is sql in java?

541






Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?

1673


How do you declare a user-defined exception?

524


Which is better join or subquery?

599


How to revise and re-run the last sql command?

643


what are the security recommendations while using mysql? : Sql dba

574


What is primary key secondary key alternate key candidate key?

538


What is the sql query to display the current date?

547


What are the different types of joins in sql?

579


What is the unique index?

523


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

541