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

difference between test suit and test scenario? (Asked in Zensar Hyderabad today(17-1-12010))

5 Answers   Zensar,


I am working in a small company as a QA analyst. Suppose company has a no testing work and they give me some other works like data entry work then how to reply in that matter. Means what I have to say? whether I have to accept the work or what? Please reply.

3 Answers  


What do you do (with the project tasks) when the schedule fails?

0 Answers  


1.What is the purpose of ?check-in?,? check-out??

6 Answers   Eka Software,


What is the difference between Shakeout, Smoke, and Sanity Testing.

5 Answers  






A Good Test Case Means..?

8 Answers  


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.

3 Answers  


how many test cases are posible to write on textbox. but it is allows the 0-10 digits numaric

3 Answers   CTS,


what are all the possible Test Cases for VoIP based applications

0 Answers  


What is diff between Defect density metrics and Defect Variance metrics ?

1 Answers   Polaris,


what is liquid fuel testing?

0 Answers  


we enter that user name field is blank and password field is blank and click on Ok. what type of testing is this 1)functional testing 2)security testing

7 Answers   ATM, Encora,


Categories