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 a default tcp/ip socket assigned for sql server? : Sql server database administration
Do you know clustered and non-clustered index?
Does the order of columns in update statements matter?
how many type of indexing in database?
Can we use trigger new in before insert?
What are the differences between DDL, DML and DCL in SQL?
Explain the ways to controlling cursor behavior?
What is cursors?
Can you tell me some of the common replication dmv's and their use? : sql server replication
How to declare a cursor with "declare ... Cursor" in ms sql server?
What is 3nf normalization form?
Does full backup break log chain?
What is the difference between functions and scalar functions?
What happens if date-only values are provided as date and time literals?
Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication