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

what are set operators in sql? : Sql dba

1058


Show the two pl/sql cursor exceptions.

1202


Explain the difference in execution of triggers and stored procedures?

1025


how to present a past time in hours, minutes and seconds? : Sql dba

1016


how to fetch common records from two tables? : Sql dba

1183


What is substitution variable in pl sql?

1051


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

1095


What company owns postgresql?

1035


What version is sql?

1039


What is structural independence and why is it important?

1033


What is multiple columns?

1076


What does subquery mean in sql?

1059


What is pl sql quora?

1176


Explain what is dbms?

1071


How do you run a query?

996