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
List out the different types of locks available in sql server?
What is index in an assignment?
What is delete query?
What are views in ms sql server?
Do you know what guidelines should be followed to help minimize deadlocks?
What is 1nf normalization form?
what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration
Can You Use Data Mining Models In Ssrs?
How to locate and take substrings with charindex() and substring() functions?
What is role playing dimension with two examples? : sql server analysis services, ssas
How to enforce security in sql server? : sql server security
What is the purpose of grouping data in a report?
What is right outer join in sql server joins?
What is merge?
What do you mean by subquery?