I have student marks in a student table. I need second
highest mark .Then what will the query for this?

Answer Posted / madan

This ans. particularly when you want 2nd highest marks?
and not for nth highest marks.

SELECT MAX(mark) FROM student WHERE mark <
(SELECT MAX(mark)FROM student)

Is This Answer Correct ?    18 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which language is supported by sql server?

701


What xml support does the sql server extend?

719


What is the difference between a local and a global temporary table?

807


What is identity?

759


What are the differences between char and nchar in ms sql server?

716






Using the customer, and order table in northwind database, please write a query to produce xml?

847


What is a transaction and why is it important?

732


Explain can you implement data mining in ssrs?

122


How to use the inserted and deleted pseudo tables?

703


How do I find sql server instance name?

691


What happens if you insert a duplicate key for the primary key column in ms sql server?

721


How to loop through result set objects using mssql_fetch_array()?

745


What is a filestream?

731


What is the syntax to execute the sys.dm_db_missing_index_details? : sql server database administration

819


How to delete exactly duplicate records from a table?

801