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

Is primary key always clustered index?

757


What is primary key in db?

747


How does one use sql*loader to load images, sound clips and documents? : aql loader

902


What is the purpose of the primary key?

789


Name the operator which is used in the query for pattern matching?

703


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

884


How to write html code in pl sql?

819


What is the use of <> sql?

756


What is dbo in sql?

726


What are inner outer left and right joins in sql?

748


what is the syntax for using sql_variant_property? : Transact sql

729


What is indexes?

772


How do you create a db file?

725


What is index example?

769


what is heap table? : Sql dba

821