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

how to convert numeric values to character strings? : Sql dba

1035


How do I remove sql developer from windows 10?

1012


What is procedure explain with program?

949


What is clustered index in sql?

1001


What is exception? What are the types of exceptions?

1030


How do I save a stored procedure?

946


How do I copy a table in sql?

928


how to drop an existing table in mysql? : Sql dba

982


How do I partition in sql?

904


How do I order columns in sql?

912


How are functions and procedures called in PL/SQL?

1128


how can we destroy the cookie? : Sql dba

959


Does db2 use sql?

889


What is the difference between having and a where in sql?

1033


When is the explicit cursor used ?

977