ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Testing >> Automation Testing >> Automation Testing AllOther
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions (496)
 Load Runner interview questions  Load Runner Interview Questions (486)
 QTP interview questions  QTP Interview Questions (3506)
 Test Director interview questions  Test Director Interview Questions (161)
 Rational TestSuite interview questions  Rational TestSuite Interview Questions (106)
 Silk Test interview questions  Silk Test Interview Questions (59)
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions (387)
Question
Write a query to find second highest salary of an employee.
 Question Submitted By :: Automation-Testing-AllOther
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
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. :-)

Thanks
 
Is This Answer Correct ?    301 Yes 56 No
Ravi
 
Answer
# 2
Select max(salary) from emp where salary NOT IN (Select max
(salary) from emp)
 
Is This Answer Correct ?    93 Yes 14 No
Pradeep Kumar
 
 
 
Answer
# 3
SELECT max(salary) as salary FROM Employee WHERE salary <
(SELECT max(salary) FROM Employee)
 
Is This Answer Correct ?    67 Yes 8 No
Dharmaraj
 
Answer
# 4
select max(sal)from emp e1 where 2<=(select count(*) from
emp e2 where e1.sal <= e2.sal);
 
Is This Answer Correct ?    65 Yes 38 No
Vittal
 
Answer
# 5
Select max(salary) from employee where salary NOT IN
(Select max(salary) from employee)
 
Is This Answer Correct ?    12 Yes 1 No
Upali Tejale
 
Answer
# 6
select *from emp e1 where &n =(select count(*) from emp
where sal >= e1.sal);
 
Is This Answer Correct ?    13 Yes 3 No
Sweety Spear
 
Answer
# 7
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 ?    10 Yes 0 No
Priyanshu
 
Answer
# 8
select * from emp A where 2=(select count(*) from emp B
where A.sal < B.sal)
 
Is This Answer Correct ?    41 Yes 36 No
Murlidhar
 
Answer
# 9
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
Lokesh Kanithi
 
Answer
# 10
select sal from
(select rank() OVER (order by sal desc) sno ,sal from emp)
y
where sno= n

here
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
Rajkumar Mandala
 

 
 
 
Other Automation Testing AllOther Interview Questions
 
  Question Asked @ Answers
 
Does automation replace manual testing?   1
you have any interaction with clients? Mind-Tree 2
how can we exactly identity whether that is manual or automation testing? and give any ex script JVS 1
Can anyone explain data driven frame work and keyword driven frame work..... Bank-Of-America 1
COULD ANYBODY GIVE ME THE DIFFERENCE B/W RATIONAL ROBO,SILKTEST,OPEN STA,LOADRUNNER,WINRUNNER,TEST DIRECTOR AND QTP? Infosys 1
Describe some problem that you had with automating testing tool.   1
What is the purpose of the testing? Satyam 11
How can u enter text in one particular text box? if one webpage contain multiple text boxes, all text boxes with same properties there in no index and Location properties   2
how to connect qtp to qc. what are the steps ? Value-Labs 1
what kind of application can be tested in winrunner,load runner,qtp,silktest,test director,rational robo,open sta? TCS 1
Hi Friends this is Srinivas. I feel very happy to share my doubts with u.what is main difference between client server application and webserver application.Nobody discribed.please send me good answer about that. my mail id:dsrao106@gmail.com. IBM 4
what is mutation testing ? when we are using this type of testing? JVS 3
 
For more Automation Testing AllOther Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com