how do you count the duplicate records in a table
Answer Posted / babu
Try this,
select col1,count(col1) from tab1
group by col1 having count(col1)>1;
If you want to delete these duplicate entries, use:
delete from tab1 where col1 in (select a.col1 from
(select col1,count(col1) from tab1
group by col1 having count(col1)>1) a);
| Is This Answer Correct ? | 18 Yes | 1 No |
Post New Answer View All Answers
Why do we need unique key in a table?
how is exception handling handled in mysql? : Sql dba
What is sql performance tuning?
what is cursor. write example of it. What are the attributes of cursor.
What is difference between sql and excel?
How to know the last executed procedure?
What is $$ in sql?
How to set up sql*plus output format in oracle?
What is sql clause?
What is a Mapplet?
What is a file delimiter?
What is sql profiler in oracle?
How do you pronounce sql?
What are all the different types of indexes?
differentiate between float and double. : Sql dba