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

Answer Posted / naresh

select top 1 age from student where age<(select top 1 age
from student where age<(select distinct max(age) from
student ))

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is store procedure?

645


What are the types of stored procedures in an sql server?

477


What does sql server mean?

538


How to create sub reports?

194


What is left outer join in sql server joins?

551






How to find the source of a table in sql server?

525


What is report rendering ?

102


What is use of except clause? How it differs from not in clause?

601


What are sql servers used for?

509


What is a covered index?

521


List the different types of collation sensitivities in sql server?

526


What command is used to delete a table from the database in the sql server and how?

542


Where do you find the default Index fill factor and how to change it?

603


Which joins are sql server default?

511


Can a table be moved to different filegroup?

574