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

Answer Posted / abhishek srivastava

select top 1 marks from (select top 2 distinct marks from
students order by marks desc)
order by marks

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a mixed extent? : Sql server administration

751


Can we return Data from 4(more than 1) tables in stored procedure?

810


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

747


What are the types of indexes?

768


Can you explain different types of locks in sql server?

709






How to create new table with "create table" statements?

728


How to generate create view script on an existing view?

742


Explain about integration services of Microsoft SQL server?

777


What is the maximum number of index per table?

761


How do you start single user mode in clustered installations?

709


Explain the ways to controlling cursor behavior?

702


What is inline variable assignment?

783


Is oracle faster than sql server?

714


What is primary key, unique key, and foreign key?

724


What is DCL?

762