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

Answer Posted / kunal sain

select mark from student s
where 1=(select count(*) from student s1
where s1.mark<s.mark);

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I run sql server 2014?

604


What is a collation?

705


What are the difference between primary keys and foreign keys?

616


What are the advantages of the mirroring?

663


What are drillthrough reports?

114






What do you mean by an execution plan? How would you view it?

580


How to create median function?

124


I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

1531


What are the differences between substr and charindex in sql server.

587


Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?

621


What is read uncmmited?

678


How can you check the version of sql server?

648


How do I view a script in sql server?

626


Difference between Inner vs outer joins?

607


What are number line correlation administrators will use while working with a subquery?

720