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

Answer Posted / rajat kumar

select top 1 marks from student where marks <(select max(marks) from student) order by marks desc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null vs coalesce?

642


Can we call future method from queueable?

755


How would you go about developing a ssrs report?

135


What are partitioned views?

743


Can we use pragma autonomous_transaction in trigger?

704






What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas

795


1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?

1724


what is a transaction and what are acid properties? : Sql server database administration

699


What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?

664


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?

838


Difference between Inner vs outer joins?

690


How to select some specific rows from a table in ms sql server?

757


what are the different types of SSRS reports?

122


What are the acid properties?

719


How does clustered and non clustered index work?

679