i have a table student like
sname
-----
ram
ram
ram
raj
raj
raj
i need the output like
sname
-----
ram
raj
ram
raj
ram
raj
Answer Posted / bobby
select ename from (select Row_Number() over (partition by
ename
order by ename) as ROWNO,ename from emp) p
order by ROWNO,ename desc
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What are the types of normalization?
What do you understand by replication in sql server?
Tell me what is the order in which the sql query is executed?
What is transaction server auto commit?
Explain candidate key, alternate key, and composite key?
How to insert data with null values?
What is spid in sql server profiler?
How do indexes help, types?
What is bit data type?
Explain the properties of the relational tables?
What are the properties and different types of sub-queries?
How to update multiple rows with one update statement in ms sql server?
Explain the commands in sql server?
What happens if the update subquery returns no rows in ms sql server?
What are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security