How to get the 5th highest value from a table?
Table:tblEmp
Fields Emp_Name,Emp_Salary
Emp_Name Emp_Salary
A 25000
B 35000
C 12000
D 50000
E 14000
F 18000
G 28000
H 50500
I 40000
From this table I want to konw who is getting 5th highest salary?
SELECT ROWNUM NUM_K, K.* FROM (SELECT ROWNUM NUM_M, M.*
FROM ( select A.EMPLID,A.EFFDT
from ( select * from ps_job where emplid = 'FHQ4' ORDER BY EFFDT DESC ) A
WHERE ROWNUM <= Variable ) M
ORDER BY EFFDT ASC ) K
WHERE ROWNUM <=1
Note :Where varaiable is the nth largest u want
Subscribe to:
Post Comments (Atom)
Command to do active duplicate for Oracle Database
1. First login to target server 2. Validate tns connectivity between Source DB and Target DB 3. Prepare and validate space availability 4. S...
-
Srvctl is not able to start database [oracle@orcldb-n2 ~]$ srvctl start database -d orcl PRCR-1079 : Failed to start resource ora.orcl.d...
-
Getting below error in EBS R12.1.3 in Oracle Database SMTP Error. Getting below error while trying to send email in XXXXXXX instance ...
-
Oracle R12 application and getting following error when trying to launch General Ledger Account Hierarchy Manager Java Plug-in 1.6.0_07 Us...
No comments:
Post a Comment