I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / adarsh pandey
select distinct mark from student_mark s
where (select count(distinct s1.mark) from student_mark s1
where s1.mark>=s.mark )=4;
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Is foreign key unique?
How to create new databases with "create database" statements?
When you use @@error and try-catch?
Explain the dirty pages?
What is the server name for sql management studio?
What are the basic functions for master, msdb, model, tempdb databases?
How to execute the cursor queries with "open" statements?
Write an SQL query to obtain the 2nd highest salary.
You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?
What is de-normalization and what are some of the examples of it?
How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?
What are locks in sql?
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration
How to delete database objects with "drop" statements in ms sql server?
Explain iaas, paas and saas?