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

How do database indexes work?

714


Can you explain what is sql server english query?

722


Explain differentiate between a having clause and a where clause?

679


How to find which stored procedure is currently running in sql server?

665


How to use clusters?

693






In what version of sql server were synonyms released?

684


Why the trigger fires multiple times in single login?

880


How to connect to SQL Azure Database by using sqlcmd?

128


What is raiseerror? What is raiseerror?

791


How to create a scrollable cursor with the scroll option?

667


How do I view a stored procedure in sql server query?

699


What is the difference between DataRow.Delete() and DataRow.Remove()?

946


What types of replication are supported in sql server?

732


What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?

131


State the difference between union and union all?

677