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 / karthik
i think ths will work!
select * from table_name where rowid in (select max
(rowid) from table_name groupby duplicate_field_name);
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How many types of primary keys are there?
Can a table contain multiple foreign key’s?
how to fetch alternate records from a table? : Sql dba
What are procedures used for?
What are different types of indexes?
What is the difference between a primary key and a unique key?
1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins
What is compiled query?
What is the use of sql trace?
Are sql database names case sensitive?
how to see the create table statement of an existing table? : Sql dba
Is sql an operating system?
what are null values? : Sql dba
How do you get column names only for a table (sql server)?
State few characteristics of pl/sql?