I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / kunal sain
select mark from student s
where 1=(select count(*) from student s1
where s1.mark<s.mark);
| Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
How to use values from other tables in update statements in ms sql server?
What is sqlservr.exe - process - sql server (sqlex?press)?
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
How to create user messages with print statements in ms sql server?
A trigger can reference objects outside the current database? State true or false.
Do you know what are the steps to process a single select statement?
Why does sql studio use a single registered database repository? : sql server management studio
In case you have filters in your report, when filters will be applied in cached report instance?
What are the disadvantages of merge replication?
How do you use a subquery to find records that exist in one table and do not exist in another?
What is truncate table?
Describe different Processing Modes offered by SSRS?
Explain stored procedure?
Does index slows down insert statements?
Why should we go for stored procedures? Why not direct queries?