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

Answer Posted / ravindra singh

select b.marks from (select distinct marks from student)
a,(select distinct marks from student) b
where a.marks >= b.marks
group by b.marks
having count(b.marks)=3

Is This Answer Correct ?    9 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a user-defined function in the sql server and what is its advantage?

619


What stored by the master? : sql server database administration

577


What is sql stored procedure?

601


what's the difference between delete table and truncate table commands? : Sql server database administration

484


Explain the difference between delete,drop and truncate in SQL Server?

592






Explain nested trigger in sql?

595


Explain datetimeoffset data type in sal server 2008?

541


what's the difference between a primary key and a unique key? : Sql server database administration

501


How many replicas are maintained for each SQL Azure database?

128


How do I perform an unattended install of sql server 2000?

604


What is openxml in sql server?

618


How can you manage sql azure security?

85


Explain the properties of the relational tables?

553


Can binary strings be used in arithmetical operations?

524


Explain what is “asynchronous” communication in sql server service broker?

496