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 are trace flags and mention a few common trace flags used with sql server?
How to query multiple tables jointly?
What are the different ways you can create databases in sql server?
What are the new features introduced in SQL Server 2000? What changed between the previous version of SQL Server and the current version?
What is temporal data type?
Does a server store data?
What is the name of the Database which IBM mainframe uses?
What is the use of tempdb? What values does it hold?
What is Command line parameters in PLSQL.?
Describe the functionalities that views support.
How do I install only the client tools of sql server 2000?
What is check constraint in sql server?
What is autocommit mode in sql server?
How data can be copied from one table to another table?
Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?