Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is it possible to include an insert statement on the same table to which the trigger is assigned?

1016


What is the usage of distinct keyword?

1067


what are sequences

1748


What are basic techniques of indexing?

1384


how to convert numeric values to character strings? : Sql dba

1107


Explain the insert into statements in sql?

1007


What is sql catalog?

1023


What is Collation Sensitivity ? What are the various type ?

952


What is pl sql variable?

992


What is scope and visibility in PL/SQL?

1204


how to calculate expressions with sql statements? : Sql dba

1034


What are the different type of joins in sql?

956


What is bulk compiling in pl/sql.?

1130


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

2016


What is difference between stored procedures and application procedures?

1013