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 only how should u
write query?

Answer Posted / yaswanth

delete from employees where rowid NOT IN(select max(rowid) from employees GROUP BY salary)

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are the different types of indexes in sql?

1053


Explain how can you save or place your msg in a table?

1026


What is a boolean in sql?

974


What is trigger and types?

1021


What is latest version of sql?

1037


What is a schema? How is it useful in sql servers?

1112


What are keys in sql?

995


How do you explain an index?

1278


How do I install microsoft sql?

1043


How to order siblings in oracle hierarchy queries?

1036


What does over partition by mean in sql?

970


Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

1159


what are the t string functions available in tsql? : Transact sql

1002


How do you copy a table in sql?

1063


What does varchar include?

943