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
How to Insert multiple rows with a single insert statement?
What is difference between drop truncate and delete?
Define outer join in sql server joins?
What is the synonym of join?
Why do we use sql limitations? Which constraints can we use while making a database in sql?
List the ways in which dynamic sql can be executed?
How do I get Report Builder to generate a parameter that can be set by users viewing the report?
What is meant by referential integrity?
What is the full form of ddl?
How to generate create procedure script on an existing stored procedure?
What is merge replication?
What are tables in sql server?
Can we insert data if clustered index is disabled?
Does sql server use java?
What are logical/boolean operations in ms sql server?