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

How to start the command-line sql*plus?

1059


How do you modify a trigger?

930


Why having clause is used in sql?

984


What is your daily office routine?

2274


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

1033


What is cost in sql execution plan?

990


Why do we need databases?

1052


State some properties of relational databases?

1060


how to see the create table statement of an existing table? : Sql dba

1022


In a distributed database system, can we execute two queries simultaneously?

1098


Mention what does the hierarchical profiler does?

1097


What is error ora-12154: tns:could not resolve the connect identifier specified?

1084


Is grant a ddl statement?

904


How to raise user-defined exception with custom sqlerrm ?

1136


what are the join types in tsql? : Transact sql

1068