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
How to create user defined functions with parameters?
What are scheduled tasks in sql server?
How does SSIS(Sql Server Integration Services) deffer from DTS(Data Transformation Services)?
Why do we use functions?
How to get the definition of a user defined function back?
Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?
What is database replication? What are the different types of replication you can set up in sql server?
What does normalization do to data?
Is candidate a key?
what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?
how to create a scrollable cursor with the scroll option? : Sql server database administration
What is the use of nvl work?
Determine when an index is appropriate?
What is the difference between mysql and sql server?
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that