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 / sarthak mohanty

DELETE
from <table_name> a
where a.rowid > ANY(select b.rowid
from <table_name> b
where a.salary=b.salary);

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do prepared statements prevent sql injection?

916


Why use truncate instead of delete?

974


What is an intersect?

1062


What are reports usually used for?

984


What are the events on which a database trigger can be based?

1142


where are cookies actually stored on the hard disk? : Sql dba

996


What is an invalid partition table?

979


How does one load ebcdic data? : aql loader

1119


Why we use triggers in mysql?

961


What has stored procedures in sql and how we can use it?

1031


How many types of indexes are there in sql?

959


what are the 'mysql' command line arguments? : Sql dba

1102


Why truncate is faster than delete?

1068


What is the difference between sum and count in sql?

951


Why is pl sql needed?

894