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
Is it possible to include an insert statement on the same table to which the trigger is assigned?
What is the usage of distinct keyword?
what are sequences
What are basic techniques of indexing?
how to convert numeric values to character strings? : Sql dba
Explain the insert into statements in sql?
What is sql catalog?
What is Collation Sensitivity ? What are the various type ?
What is pl sql variable?
What is scope and visibility in PL/SQL?
how to calculate expressions with sql statements? : Sql dba
What are the different type of joins in sql?
What is bulk compiling in pl/sql.?
hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews
What is difference between stored procedures and application procedures?