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

Answer Posted / sanah

select top 1 marks from marks where marks
<(select max(marks) from marks) order by 1 desc

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use linked server?

782


What is your recommendation for a query running very slow? : sql server database administration

769


Is natural join and equi join same?

707


How do you manipulate data?

664


How to turn off warning messages during php execution?

719






How to optimize stored procedure optimization?

670


What is the purpose of grouping data in a report?

720


What is plan freezing?

724


In what three ways is the return statement used in a stored procedure?

707


Does partitioning help performance?

683


Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

865


Explain having clause?

726


What happens when unicode strings concatenate with non-unicode strings?

733


Explain what is dbcc?

779


Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication

735