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

Answer Posted / rakesh

In Oracle

select marks from
(select marks from
(select marks from students order by marks desc)
where rownum<3
order by marks asc)
where rownum<2

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql server transaction log file?

524


What is the difference between Normalization and De-normalization?

562


What is save transaction and save point?

622


How to use "if ... Else if ... Else ..." Statement structures in ms sql server?

537


What are pessimistic lock and optimistic lock?

550






What is an entity-relationship diagram (erd)?

588


Name few endpoints exposed by ssrs 2012?

303


What are alternate keys?

576


Does a specific recovery model need to be used for a replicated database? : sql server replication

534


How many triggers are possible per table?

629


how to do partition in sqlserver

1972


What is the data type of time?

519


What is a mutating table error and how can you get around it?

536


What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?

3758


What are the ways available in sql server to execute sql statements?

570