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 get maxsal , minsal, ename department wise in single query

1499


How to drop a stored procedure in oracle?

996


What is user managed backup in Oracle?

1076


What is the dynamic sql in oracle?

1007


How to use subqueries in the from clause in oracle?

1043


Difference between pre-select and pre-query

1028


What is a nvl function?

956


How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?

2772


How can we force the database to use the user specified rollback segment?

1065


What is data block in Oracle?

1049


Explain a private synonyms?

981


How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?

2206


How do I learn what codesets are available in oracle?

997


How do I find the database name in oracle?

979


How to divide query output into groups in oracle?

943