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

What is an intersect?

1085


What is pl sql record in oracle?

1010


What are different joins used in sql?

1042


What is asqueryable?

947


what is sql server agent? : Sql dba

1080


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

1194


Which is faster view or stored procedure?

931


How do sql triggers work?

1020


Can you join views in sql?

936


Can we write dml inside a function in sql server?

929


Is it possible to sort a column using a column alias?

1025


how to convert numeric values to character strings? : Sql dba

1082


Explain how exception handling is done in advance pl/sql?

985


What are hotfixes and patches?

926


what are the non-standard sql commands supported by 'mysql'? : Sql dba

1091