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
Explain what is it unwise to create wide clustered index keys?
What are temporal tables in sql server 2016?
What are the different subsets of sql?
What is lock escalation and what is its purpose?
What is the use of @@spid?
What is the importance of three tier architecture?
What are ddl triggers and types of ddl trigger?
What is the command dbcc checkdb used for?
What is sql server programming?
What are the events recorded in a transaction log?
Explain system functions or built-in functions? What are different types of system functions?
How to create a new schema in a database?
what is the maximum size of a row? : Sql server database administration
What is the use of custom fields in report?
Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?