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 does it mean to have quoted_identifier on? : Sql dba

1181


What is a full join sql?

1105


What is a primary key called that is made up of more than one field?

1393


Why partition by is used in sql?

1083


What is dml statement?

1002


Why we use sql profiler?

1023


What is the difference between subquery and correlated query?

1120


What is a dynamic query?

1073


what is schema? : Sql dba

1113


What are the key differences between SQL and PL SQL?

1286


If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

4061


What are the query optimization techniques?

1000


What is microsoft t sql?

985


What is difference between sql function and stored procedure?

1063


What is example of database?

1134