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
what does it mean to have quoted_identifier on? : Sql dba
What is a full join sql?
What is a primary key called that is made up of more than one field?
Why partition by is used in sql?
What is dml statement?
Why we use sql profiler?
What is the difference between subquery and correlated query?
What is a dynamic query?
what is schema? : Sql dba
What are the key differences between SQL and PL SQL?
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????
What are the query optimization techniques?
What is microsoft t sql?
What is difference between sql function and stored procedure?
What is example of database?