I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / poomanibe
with temptab as
(
select row_number() over(order by substring(marks,1,2)) as
rownum,* from Student
)
select * from temptab where rownum=1
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is difference between views and stored procedures?
Does a full backup include transaction log?
what is the primary use of the model database? : Sql server administration
What are data regions?
Differentiate between truncate vs delete in mssql?
How do I find query history in sql server?
what is difference between view and Dip.
How to delete duplicate rows?
Would you store your query in a ssrs report or a database server? State the reason why?
You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?
What is difference between count (*) and count 1?
Explain foreign key in sql server?
How to create stored procedures with parameters in ms sql server?
What is a functions and types in sql server?
What is a fan-out query in SQL Azure?