I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / vk
select studentid,student_name,marks from
(select row_number() over (partition by marks order by marks desc) as rnk,studentid,student_name,marks from student_marks)
where studentid in (1,4);
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is it unwise to create wide clustered index keys?
How many databases can we create in a single server?
What is named query? : sql server analysis services, ssas
How can you check the version of sql server?
What is a dataset and what are the different types of datasets?
What is the optimization being performed in oracle and SQL Server?
How would you add a section to a table?
What is a cache in ssrs?
How to scale out a federation by Sql statement?
hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.
How to display a past time in days, hours and minutes?
How will you monitor replication latency in transactional replication? : sql server replication
What is database dimension? : sql server analysis services, ssas
What is the difference between varchar and varchar types?
What is the difference between lock, block and deadlock? : sql server database administration