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 / sarath
I don't know the exact intention of the above answers, but I am making mine clear that to find the TOTAL DUPLICATED RECORDS and THEIR COUNT OF REPETITIONS, the Pseudo code is:
Select col1,col2,col3,....,COLn count(*) from <TN>
group by col1,col2,col3,....,COLn having count(*) > 1;
Wish everybody complies with it, its tested.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do I create a sql script?
How many primary keys can a table have?
Can a table have no primary key?
what are the differences between char and varchar? : Sql dba
what are different types of keys in sql?
What is compute?
What is natural join in sql?
how to start mysql server? : Sql dba
How does cross join work in sql?
What does select * from mean in sql?
Is left join inner or outer?
List out the acid properties and explain?
What is the difference between the repeatable read and serializable isolation levels? : Transact sql
What is a primary key example?
What is not equal in sql?