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 to initialize variables with default values?

1223


How to define a specific record type?

1079


 How to use an oracle sequence generator in a mapping?

1061


What is a server parameter file in oracle?

1041


How to calculate date and time differences in oracle?

1028


How to create a stored program unit?

1205


Who developed oracle & when?

993


What is the quickest way to fetch the data from a table?

1054


Why packages are used in oracle?

1059


How to drop an existing view in oracle?

936


How to create an oracle testing table?

1055


What is partitioned table in Oracle?

1178


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2951


What is meant by joins?

1051


Explain a private synonyms?

1024