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 sql server profiler trace data file?
What are the authentication modes in sql server? How can it be changed?
How to execute a sql statement using mssql_query()?
How to perform key word search in tables?
what is memory-optimized nonclustered indexes
Issues related in upgrading SQL Server 2000 to 2005 / 2008
What is etl - extraction, transformation, and loading?
What is the importance of three tier architecture?
How to execute multiple stored procedures at one time in sql server?
What are page splits? : SQL Server Architecture
What is the difference between ‘having’ clause and a ‘where’ clause?
what is the difference between Delete and Truncate command in SQL
what is create database syntax? : Sql server database administration
Explain about sql server login?
What are relationships and mention different types of relationships in the dbms