write the SQL statement to retrieve the 2nd Highest salary
ammount(File Name="EMPLOY",Field Name="SALARY")

Answers were Sorted based on User's Feedback



write the SQL statement to retrieve the 2nd Highest salary ammount(File Name="EMPLOY",Fi..

Answer / kamal

hi,
select max(salary) from empfile where salary <(select max
(salary from empfile))

or

select salary from empfile a 2=(select count(salary) from
from empfile b where b.salary>=a.salary)

Is This Answer Correct ?    24 Yes 2 No

write the SQL statement to retrieve the 2nd Highest salary ammount(File Name="EMPLOY",Fi..

Answer / yogesh

This is correct answer -Try it

SELECT SALARY FROM EMPLOYEE WHERE SALARY < (SELECT MAX
(SALARY) FROM EMPLOYEE) ORDER BY SALARY DESC FETCH FIRST 1
ROW ONLY

Is This Answer Correct ?    12 Yes 2 No

write the SQL statement to retrieve the 2nd Highest salary ammount(File Name="EMPLOY",Fi..

Answer / aravind.r

select min(SALARY) from EMPLOY where SALARY in
(select top 2 SALARY from EMPLOY order by SALARY desc)

Is This Answer Correct ?    7 Yes 5 No

write the SQL statement to retrieve the 2nd Highest salary ammount(File Name="EMPLOY",Fi..

Answer / sandeep

select top 1 salary from employee where salary<(select top 1 salary from employee order by salary desc) order by salary desc

Is This Answer Correct ?    2 Yes 1 No

write the SQL statement to retrieve the 2nd Highest salary ammount(File Name="EMPLOY",Fi..

Answer / vivek dwivedi

Select max(salary) from file where salary not in (select max(Salary) from file)

Is This Answer Correct ?    0 Yes 0 No

write the SQL statement to retrieve the 2nd Highest salary ammount(File Name="EMPLOY",Fi..

Answer / suresh miryala

select top 1 from (select top 2 from emp order by sal desc)A
order by sal

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More IBM AS400 AllOther Interview Questions

what is the command to know key fields of file?

0 Answers   IBM,


Describe the function of SETLL operation in RPG language?

1 Answers  


How to see active jobs of the system.

1 Answers  


how to get the particular field's records in CL without using OVRDBF,OPNQRY? tell me the concept?

2 Answers  


Can we debug the MSGW JOBS?

0 Answers  






What is the maximum number of subfiles that can be specified in a display file?

1 Answers   IBM,


Service Program : S1 Modules in S1 : M1 M1 having two procedures : ADD, SUB Current Binder Language STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP Doubt: I need to add one new Module to the Service Program M2 having one procedure ‘MULT’ How to add this new module to the service program S1 ? If I need to recreate the service program again, Do I need to mention the Module M1 again while recreating along with new Module M2? There is no Binding Directory. Binder language structure will be like this STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") EXPORT SYMBOL("MULT") ENDPGMEXP STRPGMEXP PGMLVL(*PREVIOUS) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP

0 Answers  


What is file access opcodes?

0 Answers   IBM,


what is arrival sequence?

1 Answers   IBM,


how to write *pssr ?

0 Answers   IBM,


what are the important factors in error message subfile ?

0 Answers   IBM,


How can you check the existence of object in a system?

1 Answers  


Categories