I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / adarsh pandey
select distinct mark from student_mark s
where (select count(distinct s1.mark) from student_mark s1
where s1.mark>=s.mark )=4;
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How will you optimize a stored procedure optimization?
What is the latest version of microsoft sql server?
What do you know about system database? : SQL Server Architecture
While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?
What do you mean by authentication modes in sql server?
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
What is sql server replication? : sql server replication
What is difference between index and primary key?
What is data compression? : sql server database administration
How to delete an existing row with delete statements in ms sql server?
What is db stored procedure?
How do I find the default sql server instance?
What is an active database?
How to filter out duplications in the returning rows in ms sql server?
what does the automatic recovery do? : Sql server administration