I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / lokeshwaran s
SELECT MAX(marks) AS second_highest_mark
FROM student
WHERE marks < (SELECT MAX(marks) FROM student);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
Why use sub query in sql server and list out types of sub queries?
How do you drop an index?
What does it mean to normalize a database and why would you do it?
How to move database physical files in ms sql server?
Explain differentiate between a having clause and a where clause?
Explain the flow of creating a cube? : sql server analysis services, ssas
What are data files?
Is it true, that there is no difference between a rule and a check constraint?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What are the different types of cursor?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
Can sql servers link to other servers like oracle?
What is stretch database in sql server?
how to control the amount of free space in your index pages? : Sql server database administration