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
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5
Why do we use joins in sql?
What is nvarchar in sql?
Why is theta join required?
What is primary key sql?
What is the difference between the implicit and explicit cursors?
how can we destroy the cookie? : Sql dba
Why is nosql good?
Is sql an operating system?
What is partition by in sql?
what are the difference between clustered and a non-clustered index? : Sql dba
How do I quit sql?
what is cursor. write example of it. What are the attributes of cursor.
Does google use sql?