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

Answer Posted / sadaq moulani

select top 1 marks from student where marks in(select
distinct top 2 marks from student order by marks desc)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create prepared statements using odbc_prepare()?

778


How to convert a numeric expression from one data type to another?

697


Explain boyce and codd normal form(bcnf)?

699


What are the dmvs? : sql server database administration

780


What is difference between join and natural join?

647






How to get @@error and @@rowcount at the same time?

775


How to execute the cursor queries with "open" statements?

835


How to define the name and server for a new dsn?

723


How does Report Builder support Analysis Services cubes?

136


What is a field name?

709


what type of index will get created after executing the above statement? : Sql server database administration

724


Tell me can we use custom code in ssrs?

755


What does dml stand for?

685


What is full outer join in sql server joins?

734


Explain the microsoft sql server delete command? : SQL Server Architecture

777