I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / siva prakasam
SELECT TOP (1) stuMark
FROM Student
WHERE stuMark < (SELECT MAX(stuMark) FROM Student)
ORDER BY stuMark DESC
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is difference between unique and primary key?
what is a sub-report?
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
How to apply cascading referential integrity in place of triggers?
What are the different types of lock modes in sql server 2000?
How do you send email on SQL Server?
Is sql different from sql server?
What is a print index?
Explain rdbms?
Explain “row_number()” in sql server with an example?
What are types of subqueries?
What is sql server replication? : sql server replication
What is encryption key?
What is data compression? : sql server database administration
Why is there a performance difference between two similar queries where one uses union and the other uses union all?