I have student marks in a student table. I need second
highest mark .Then what will the query for this?
Answer Posted / ahmed
SELECT TOP 1 student marks
FROM(
SELECT TOP 2 student marks
FROM students_table
ORDER BY student marks DESC) AS emp
ORDER BY student marks ASC;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of keyword with encryption.
While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?
What are the advantages of user-defined functions over stored procedures in sql server?
What is a domain constraint give an example?
Some queries related to SQL
What is the simplest way to create a new database in ms sql server?
How many types of triggers in sql server?
Why use stored procedures in sql server?
What are the different kinds of ssrs reports?
What is the name of reporting services config file and what’s it’s used for?
What are the types of resultset?
You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?
What are system databases into sql server (2005/2008) : sql server database administration
Explain encryption of entire databases without the need for application changes in sql server 2008?
What happens if ntwdblib.dll is missing on your machine?