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...

one of the column in my table contains the data like
SAL
----
1000
1000
2000
3000
3000

So my requirement is i want output like
SAL
---
1000
2000
3000

it mean i want to delete duplicate rows only how should u
write query?

Answer Posted / swastik

DELETE FROM Emp A
WHERE ROWID NOT IN
                  (
                   SELECT MIN(ROWID)
                   FROM Emp B
                   WHERE A.Sal = B.Sal
                  )

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you update a sql procedure?

1007


Does group by remove duplicates?

1018


what is a database transaction? : Sql dba

1151


what is innodb? : Sql dba

1081


Can we insert in sql function?

1062


How to select all records from the table?

1115


How to take user input in pl sql?

1145


Can you rollback after commit?

964


What are %type and %rowtype for?

1041


Explain normalization and what are the advantages of it?

938


How can the performance of a trigger be improved?

1019


How do I view tables in sql developer?

920


Which join is like inner join?

1004


What are different types of sql commands?

1090


What are the different types of tables in sql?

969