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

Answer Posted / b.bathakaraithangam,giri

select * from student where mark=(select max(mark) from
student where mark not in (select max(mark) from student))

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of collation sensitivity in sql server?

670


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1569


Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many

606


What are the steps to process a single select statement?

599


Which are the olap features?

655






What are types of subqueries?

638


What is use of dbcc commands?

704


What is normalization of database?

678


Why truncate is ddl command?

611


Explain about service Broker functions?

687


What is federation member?

103


What are the tables in sql?

705


How to use subqueries in the from clause in ms sql server?

664


why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration

646


What’s the use of custom fields in report?

648