12,549,320 members (45,179 online)
Rate this:
See more:
i have table- student.which is having fields studentid,studname,mark.i want to get the student name who is having the 3rd highest mark.number of rows are not known,i dont know whether it is required for the calculation,if yes assume any number and give me the answer.thanks in advance
Posted 26-Jun-12 17:00pm

Rate this:

## Solution 2

Try this:
```SELECT
TOP 1 marks
FROM
(SELECT DISTINCT TOP 3 marks FROM student ORDER BY marks DESC) a ORDER BY marks```
Or this one
```WITH Results as
(SELECT Row_Number() over (ORDER BY marks DESC) as RN,* FROM student)
SELECT * FROM student WHERE RN=3```
sravani.v 27-Jun-12 0:08am

My 5! for first query

Thank you Sravani!
sravani.v 27-Jun-12 4:44am

No...searching for another job.

Where?
Rahul Rajat Singh 27-Jun-12 3:01am

Nice. +5.

Thank you Rahul!
subin joseph 27-Jun-12 6:50am

what does 'a' in this query stand for.is it any object
Sebastian T Xavier 28-Jun-12 0:35am

Rate this:

## Solution 3

Hi ,
Check this also
```select MAX(marks) from student where marks <
(select MAX(marks) from student where marks <
(select MAX(marks) from student ))```
Best Regards
M.Mitwalli
Rate this:

## Solution 1

How about applying the answers to sql query to find 2nd maximum salary[^]?

Top Experts
Last 24hrsThis month
 Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ) 80 manu_dhobale 45 Suvendu Shekhar Giri 30 Peter Leow 25 Dave Kreskowiak 20
 OriginalGriff 3,902 Suvendu Shekhar Giri 1,733 John Simmons / outlaw programmer 1,687 ppolymorphe 1,546 Karthik Bangalore 1,210