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 / abin

Select sal from (Select *,ROW_NUMBER() over (partition by
sal order by sal asc)num from emp) a
Where num=1

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how many groups of data types? : Sql dba

1020


Does a primary key have to be a number?

963


which operator is used in query for pattern matching? : Sql dba

1005


i have some prob lem to tell me about my self in interview first round ...

2159


How do I write a sql query in pgadmin 4?

972


Why is theta join required?

1142


what is denormalization. : Sql dba

1105


How do you change a value in sql?

1013


What is pl/sql table? Why is it used?

1036


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

1105


what is the difference between char_length and length? : Sql dba

1041


List the various privileges that a user can grant to another user?

1038


How do you update a table in sql?

984


How to get each name only once from an employee table?

1112


What is pl sql quora?

1143