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
Why are cursors used?
How do I make sql search faster?
How to select 10 records from a table?
How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?
what are the advantages and disadvantages of views in a database? : Sql dba
what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba
How do I run a sql query in pgadmin 4?
What are synonyms in sql?
What is sql procedures and functions?
What is plpgsql language?
how to dump a table to a file with 'mysqldump'? : Sql dba
Is left join same as inner join?
What is union and union all keyword in sql and what are their differences?
Is pl sql a programming language?
Can I create table without primary key?