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

what are the join types in tsql? : Transact sql

980


What is a dirty read sql?

1027


How do I edit a trigger in sql developer?

934


Can two tables have same primary key?

915


describe mysql connection using mysql binary. : Sql dba

990


How do you delete data from a table?

971


what is the difference between rownum pseudo column and row_number() function? : Sql dba

1018


What is program debugging?

1126


What is function and procedure in pl sql?

967


What are % type and % rowtype?

977


What is the process of debugging?

1000


how to select first 5 records from a table? : Sql dba

918


How do you rename a table in sql?

1027


What is percent sign in sql?

1212


what are the different tables present in mysql? : Sql dba

922