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 / amit

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

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is substitution variable?

1098


how to enter characters as hex numbers? : Sql dba

1104


What is the difference between having clause and where clause?

1116


Why use truncate instead of delete?

1074


what is recursive stored procedure? : Sql dba

1028


what is the difference between truncate and drop statements? : Sql dba

1182


How does sql store data?

959


What type of database is cloud sql?

1160


what is column? : Sql dba

1052


What is procedure function?

1126


How do I create a sql database?

1055


List different type of expressions with the example.

973


Is sql dba a good career? : SQL DBA

1049


What is union and union all keyword in sql?

1111


What is #table in sql?

1182