Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 ?    13 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 are the different types of variables available in cl?

1 Answers   IBM,


define the purpose of the %sst function?

1 Answers   IBM,


what is rpg ?

1 Answers   IBM,


how can u check no of records in a file?

0 Answers   IBM,


what is the difference between udate and the system date?

1 Answers   IBM,


why we use binding directory and service pgm

4 Answers   TCS,


what is the disadvantage of using global variable?

0 Answers   IBM,


what is lokup opcode?

1 Answers   IBM,


DIFFERENCE BETWEEN BINDING LANG AND BIND DIR WHEN USING IN SERVICE PGM...when using binding directory service pgm is necessary?

2 Answers   CTS,


What is library is as400? What are the types of library?

1 Answers  


What is the purpose of CHGPF (Change physical file) command?

1 Answers  


What is the maximum number of elements in an array?

1 Answers  


Categories