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 / pradip jain
select sname from (select Row_Number() over (partition by
sname
order by sname) as ROWNO,sname from student) p
order by ROWNO,sname desc
only change table name same as bobby
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain tablesample?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
What are the kinds of subquery?
What is replace and stuff function in sql server?
How to set database to be single_user in ms sql server?
Explain about sql server login?
Explain datetime2 data type in sal server 2008?
Determine how to use the inserted and deleted pseudo tables?
What are the different normalization forms?
How each E-R model constructs can be mapped to the relational model?
What are the dmvs?
What is a partition key?
How to convert numeric expression data types using the cast() function?
How to restore performance issues and how to check?
What is the maximum size of a dimension? : sql server analysis services, ssas