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
What is a cache in ssrs?
Explain the phases a transaction has to undergo?
Define right outer join in sql server joins?
Explain rdbms?
Write a SQL query to delete a table?
what's the information that can be stored inside a bit column? : Sql server database administration
List out the difference between union and union all in sql server?
Does partitioning ssd reduce performance?
Where can you add custom error messages to sql server?
What is nonclustered index on computed columns?
What it means to be triggered?
Describe in brief system database.
How to maintain a fill factor in existing indexes?
What is DCL?
What is a not null constraint?