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
Where views are stored in sql server?
How to generate create view script on an existing view?
When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?
Can sql server 2016 run on windows 7?
What is a view and what are its advantages?
I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration
How to generate random numbers with the rand() function in ms sql server?
Mention the 3 ways to get a count of the number of records in a table.
What is public role in sql server?
What is a database in ms sql server?
How to delete duplicate rows?
What are system databases into sql server (2005/2008)?
What are the differences between stored procedure and view in sql server?
What are scalar functions in sql?
Explain partitioned view?