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
What is nvarchar max in sql?
what are the non-standard sql commands supported by 'mysql'? : Sql dba
Explain what is a subquery ?
What is an index in sql with example?
How to add a column ‘salary’ to a table employee_details?
Where is all the data on the internet stored?
How can you load microsoft excel data into oracle? : aql loader
what does the t-sql command ident_incr does? : Transact sql
Which type of cursor is used to execute the dml statement?
Explain 3 basic parts of a trigger.
What is difference between group by and partition by?
What is sqlite format?
Why join is faster than subquery?
What is cold data?
Can a select statement fire a trigger?