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

Answer Posted / dharmendra k. dixit

SELECT TOP 1 Marks (SELECT TOP 2 Marks from Tablename Order
by Marks Desc)From Tablename order by Marks Asc

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to recover from sql injection? : sql server security

702


What are acid properties of transaction?

693


What is scan table/view and seek table/view when its occurs? : sql server database administration

736


Explain about remote stored procedure?

774


Do you know data definition language, data control language and data manipulation language?

798






What are the new features introduced in SQL Server 2000? What changed between the previous version of SQL Server and the current version?

2033


What is a not null constraint?

773


what data regions are and what are the different data regions?

115


Is candidate a key?

713


How can you stop stored procedures from recompiling?

645


what are the important architecture components of SSRS?

112


How to use linked server?

782


‘Order by’ is not allowed in a view how can you sort information from a view?

800


How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?

933


What is the difference between migration and upgradation in sql server?

796