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
What is orm in sql?
What is posting?
What is the use of nvl function?
Why is normalization important?
What is the basic structure of an sql?
How exception handling is done in advance pl/sql?
What does := mean in pl sql?
What is crud diagram?
What is the use of double ampersand (&&) in sql queries? Give an example
What are the different types of sql commands?
What are the basic techniques of indexing?
How can you create an empty table from an existing table?
What are the steps for performance tuning.
what is a trigger? : Sql dba
how can we take a backup of a mysql table and how can we restore it. ? : Sql dba