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
What is msdb database? : SQL Server Architecture
What happens when the SQL Azure database reaches Max Size?
you have couple of stored procedures that depend on a table you dropped the table and recreated it what do you have to do to reestablish those stored procedure dependencies?
Define candidate key, alternate key, and composite key.
Explain different types of Normalization.
What is the recommended total size of your memory optimized tables?
Explain primary key in sql server?
Can You Use A Stored Procedure To Provide Data To An Ssrs Report?
Explain sql server authentication modes?
1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.
What is the use of for clause?
What is delete query?
What is forward - only cursors / read only cursor?
What is @@error in sql?
What are sp_configure commands and set commands?