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

Answer Posted / kumaravel

try using this...
select top 1 from student where marks in (select top 2 from
student order by marks desc)

Is This Answer Correct ?    16 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we determine what objects a user-defined function depends upon?

522


Explain what is the use of custom fields in report?

501


A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?

526


Mention a few common trace flags used with sql server?

544


What is rolap and its advantage? : sql server analysis services, ssas

646






What is an expression in ms sql server?

573


List the ways in which dynamic sql can be executed?

647


what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration

525


How do I install sql server?

470


What are the different authentication modes in sql server?

578


What are the requirements on sql server network connections?

525


what is new philosophy for database devises for sql server 7.0? : Sql server database administration

519


What is efficiency data?

527


How to copy the tables, schema and views from one sql server to another?

560


How to use “drop” keyword in sql server and give an example?

688