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 are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?
Explain what is public role in sql server?
How to count duplicated values in a column in ms sql server?
What is normalization? What number of normalization shapes are there?
Explain the flow of creating a cube? : sql server analysis services, ssas
What is database replication? What are the different types of replication you can set up in sql server?
What is a hint?
How do you delete a data source?
Comment,Datatypes are unlimited
What is table constraint?
Is it possible for a stored procedure to call itself or recursive stored procedure?
what is memory-optimized nonclustered indexes
Explain the steps needed to create a scheduled job?
Explain an incremental backup?
Write an sql query for deleting duplicate rows?