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
Where is all the data on the internet stored?
What does the base_object_type column shows in the user.triggers data dictionary view?
Explain what is a database?
What are the types of operators available in sql?
Is sql considered coding?
What is difference between function and trigger?
How do I truncate a word?
How do I save a sql query?
What is the size of partition table?
i have some prob lem to tell me about my self in interview first round ...
What is foreign key and example?
What is difference between primary and secondary key?
Where is sql database stored?
How do you update a value in sql?
what are date and time data types in mysql? : Sql dba