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 / murthy
select e.name from
(select *,row_number() over (partition by name order by
name) as Rw from #T1) e
order by e.Rw,name desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is denormalization and when would you go for it? : Sql server database administration
What is the Difference Between Primary and Foreign Key?
Explain what are the authentication modes in sql server?
What is an identity?
Does group by or order by come first?
When would you use the stored procedures or functions?
Does partitioning improve performance sql server?
What does it mean to be in union?
Explain “@@rowcount” and “@@error” in sql server?
What is the maximum number of index per table?
what are the different types of SSRS reports?
How to apply filtering criteria at group level with the having clause in ms sql server?
What is sql server agent and what are the two modes of authentication in sql server?
What is indexing a document?
Explain microsoft sql server functions?