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

What is ssrs?

99


What do you think of this implementation? Can this be implemented better?

535


Which command is used for user defined error messages?

562


What are the advantages of mirroring?

574


What is de-normalization in sql database administration? Give examples?

538






Explain primary key, foreign key and unique key?

548


List the different types of joins?

571


What is sql server english query?

547


What is the default value of an integer data type in sql server 2005?

588


What does null mean?

601


in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

554


How display code or Text of Stored Procedure using Sql query in Sql Server ?

611


What is the need for group functions in sql?

567


Write a program using SQL queries to find a unique entry in a table.

548


Write a sql query to sort on different column name according to the parameters passed in the function?

536