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

what is test log..? what it consists?

7 Answers   MBT,


what is the difference between project based testing and product based testing?

2 Answers   Infinite Computer Solutions,


please tell me the test cases for the following scenario 1. Two windows are there in one window pin code text box and ok button will be there.... we need to enter the pin code no and then click on ok........ basing on this in second window post offices address should come...........what are the imp test cases for that.....

9 Answers   IBM,


Suppose u found a bug which a developer could not reproduce and it is reproducing on your pc whenever tried , then in this siyuation what will be the status of the bug, and what u r going to do for that bug.

4 Answers   Flextronics, Syntel,


what is project and how many types of industry projects are there

1 Answers  






Write all combinations of test cases for calculater on + symbel

0 Answers  


plz send test cases for system shutdown

1 Answers   TCS,


if tester found some bugs in the application then which format they will send it to development team.

4 Answers   HCL,


What is Version Control?

2 Answers  


what is differance between web applicatins and web based applications?

0 Answers   CA,


Mention critical bugs in hospital management system i.e. project has 4 modules like appoint, patient chart, reports, pharmacy

1 Answers  


what is the difference between test senario and test case?

3 Answers   ITC Infotech,


Categories