Write a query to find second highest salary of an employee.
Answers were Sorted based on User's Feedback
Answer / ravi
I write this query and it run !!
SELECT max(salary) FROM Employee WHERE Employee.salary <
(SELECT max(salary) FROM Employee)
Plz reply if anyone having generic answer. :-)
|Is This Answer Correct ?||310 Yes||56 No|
Answer / pradeep kumar
Select max(salary) from emp where salary NOT IN (Select max
(salary) from emp)
|Is This Answer Correct ?||95 Yes||15 No|
Answer / vittal
select max(sal)from emp e1 where 2<=(select count(*) from
emp e2 where e1.sal <= e2.sal);
|Is This Answer Correct ?||66 Yes||38 No|
Answer / upali tejale
Select max(salary) from employee where salary NOT IN
(Select max(salary) from employee)
|Is This Answer Correct ?||13 Yes||1 No|
Answer / priyanshu
select First_Name,Salary from employees where salary in
( select max(salary) from employees
where salary < ( select max(salary) from employees) ),
|Is This Answer Correct ?||11 Yes||0 No|
Answer / sweety spear
select *from emp e1 where &n =(select count(*) from emp
where sal >= e1.sal);
|Is This Answer Correct ?||13 Yes||3 No|
Answer / lokesh kanithi
Select * from emp e where 2=(select count(Distinct(esal))
from emp where e.esal<=emp.esal)
|Is This Answer Correct ?||27 Yes||22 No|
Answer / rajkumar mandala
select sal from
(select rank() OVER (order by sal desc) sno ,sal from emp)
where sno= n
y : is the alias name for (select rank() OVER (order by sal
desc) sno ,sal from emp)
n : is the number ie if u want second highest sal then 'n'
value will be 2. for third highest n= 3...
|Is This Answer Correct ?||7 Yes||2 No|
If testing is done using white box testing,then what is the need of using Black box testing again? I mean when unit testing and Integration testing is done at Coding level, what is the need of testing again at testing level?
Can anybody suggest me which Functional tool will support SOLARIS(QTP,WinRunner,Rational.....)
Describe common problems of test automation.
explain add in manager and virtual object wizard in winrunner
How do you start Selenium RC?
When do you start developing your automation tests?
Discuss the economics of automation and the role of metrics in testing.
hi friends i got placed in accenture july stil i hav not recieved offer letter... 2 weeks b4 HR cllaed ask abt the location do u perfer.... stil i am waiting i jus wanted to know wat posotin is going if somebody knows pls help me
what is are the difference between qtp and selenium ?
Can you explain me what is object repository?
Can anybody tell me the any open source automation testing tool for functional testing to test web based application.? pls suggest its urgent.
Hi, here r some questions, which were asked in Ekaplus, plz process these questions. 1. How we connect with the version?