|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
select query
dear sir,
how to write select query to find 5th highest value in a emp table pl tell me the answer for this question. |
|
#2
|
||||
|
||||
|
Code:
SELECT * FROM table ORDER BY field DESC LIMIT 4,1
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
||||
|
||||
|
jeremy, that only works in mysql (and with slight modification, in postgresql)
how about a solution in standard sql -- Code:
select *
from employee X
where 4 =
( select count(*)
from employee
where salary > X.salary )
rudy http://r937.com/ |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > select query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|