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

Answer Posted / vikas kant

select Top 1 marks from students where marks in(select Top
2 marks from students order by marks desc)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Create and insert into temp table in sql server?

680


What are rows and columns?

623


How to execute multiple stored procedures at one time in sql server?

602


Explain filtered indexes?

652


How do you handle datasets larger than 50 gb?

146






Which are the two editions in which SQL Azure database available?

109


what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?

1663


Define inner join in sql server joins?

622


Define Joins?

685


What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?

685


Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication

644


How to create function without parameter in sql server?

647


Do you know what is a trace frag? Where do we use it?

640


What is a db view?

609


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

629