An employee table, with the columns id, name, sal and
dob.Query to select emp names of all highest salaries(there
are 4-5 people having the same salary which happens to be
the highest).

Answers were Sorted based on User's Feedback



An employee table, with the columns id, name, sal and dob.Query to select emp names of all highest ..

Answer / sujan thota

select name from emp where sal=(select max(sal) from emp)

Is This Answer Correct ?    6 Yes 0 No

An employee table, with the columns id, name, sal and dob.Query to select emp names of all highest ..

Answer / varun b n

select * from emp where sal = (select Max(sal) from emp)

Is This Answer Correct ?    6 Yes 2 No

An employee table, with the columns id, name, sal and dob.Query to select emp names of all highest ..

Answer / n. pavankumar

select * from emp where sal in (select max(sal) from emp)

Is This Answer Correct ?    2 Yes 2 No

An employee table, with the columns id, name, sal and dob.Query to select emp names of all highest ..

Answer / naveen kamatam

select ename, salary from emp e
where 4 > (select count(distinct salary)from emp where
Salary > e.salary)

it will fetch top 4 high salary records

Is This Answer Correct ?    1 Yes 2 No

An employee table, with the columns id, name, sal and dob.Query to select emp names of all highest ..

Answer / n@n!

emp table= emp;
column id =column_id;
name = name;
sal= sal;
dob= dob;


select top 1 name,sal,column_id,dob from emp order by sal
desc

while u run this query only one row was effected which
shows employee taken highest salary along with details like
column id,dob,name,sal.

if u want 5 employees list then replace top 1 by top 5



plz let me know if it was wrong (along with ur
query)...................

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Manual Testing Interview Questions

Can u plz write/tell me 2 main Negative Test Cases for my Mobile Phone.

7 Answers   Xavient,


Hi freinds..im priyan 4rm banglore. i recently got an job on 2+(manual testing) by faq experience.in 2 days im going 2 join in company. now, can u any tel me pls how s there n company & environment. and what work did they give for me in starting & vat work shal i do there..? pls give me reply & help me soon. pls dont mind.

7 Answers  


3) What is PDCA Cycle?

4 Answers   Mind Tree, Scope International,


explain - Test plan, Test case, test scenario, test data, test report,

1 Answers  


What is Testers role in a s/w firm?

3 Answers   winfoware,


i have 1.6 years exp .but i wish to learn QTP .so how can proceed for that .shall i do any course for that or self study.what is the market situation for QTP??

2 Answers  


Lets say,you are not finished with testing a application,your manager gives you a new task,how do you prioritize your time,what should you do

1 Answers  


What are the goals of a performance testing of a web application

1 Answers   ProKarma,


If you find a bug and the developer says it is as-designed, what can you do?

4 Answers   Wells Fargo,


what is fs

5 Answers   Logica CMG,


How to write test condition for testing a URL??

3 Answers   STC, TCS,


levels of testing

12 Answers   Accenture, TATA,


Categories