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 in the table
permanently and i want output in the above formatow should u
write query?

Answer Posted / guest

SQL> DELETE FROM <TABLE_NAME>
WHERE (ROWID,SAL) NOT IN
(SELECT MIN(ROWID),SAL FROM <TABLE_NAME>
GROUP BY SAL);

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between sga and pga.

1103


What are joins in sql?

983


What is recursive join in sql?

964


what is a tablespace? : Sql dba

1018


What is the difference between function, procedure and package in pl/sql?

1172


what is index? : Sql dba

962


What is coalesce sql?

958


What is primary key and foreign key with example?

895


What is difference between sql and excel?

1038


Can we call stored procedure in function?

918


How do I partition a table in sql?

1071


What is thread join () in threading?

971


What are the constraints available in sql?

1013


What are the two different parts of the pl/sql packages?

1046


How many types of indexes are there in sql?

959