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

Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?

547


Do you know the cursor types?

619


What is resultset concur_updatable?

584


What are the disadvantages of indexes?

532


How to rename an existing table with the "sp_rename" stored procedure in ms sql server?

538






What are the different kinds of ssrs reports?

170


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1469


Explain error handling in ssis?

570


How to make conditional sum in ssrs?

132


How can we delete Duplicate row in table?

636


What are the advantages of using cte?

555


Can we use max in where clause?

517


What do you know about system database? : SQL Server Architecture

494


Tell me what do you understand by a view? What does the with check option clause for a view do?

643


What are the types of normalization?

550