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 to delete all duplicate records from a table using
subquery?

Answer Posted / lingareddy

by using below sub query delete duplicate all records:

DELETE FROM dept WHERE salary IN (
SELECT salary FROM dept GROUP BY salary HAVING ( COUNT(salary) > 1 ))


here is dept is the table name
salary is the column name

for any doubts about SQL contact with me

Thanks & Regards
Lingareddy.S

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How oracle handles dead locks?

1124


How to increment dates by 1 in oracle?

1133


Is postgres faster than oracle?

1080


How to define and use table alias names in oracle?

986


How many types of auditing in Oracle?

1086


How to add another datafile to a tablespace?

1086


What is Redo Log Buffer in Oracle?

1276


What are the numeric comparison operations?

1164


What is hash cluster in oracle?

1244


What privilege is needed for a user to create tables in oracle?

990


Give the advantages and disadvantages of clusters.

1096


How to calculate date and time differences in oracle?

1092


State all possible different index configurations a table can possibly have?

1095


How to rename an existing table?

1207


what are the default admin accounts in Oracle 10g ?

1019