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 kind of interview questions can I expect for an entry level(2 years of exp) software testing position. I am attending for the first interview and bit nervous what to prepare and how to prepare.the company I applied is a product(anti virus software) based company. so what kind of questions can I expect .please help me for preparing .

2 Answers  


Hi friends, Is there any difference in testing the web applications which are built on different technologies like .NET,PHP,J2ee etc ?if yes then how the testing differes from one to other?(for me its urgent to know the diff. btn .net and php).can anybody answer soon....!

3 Answers   Sinertel,


How can you decide max number of testcases for a Module?

3 Answers   Verizon,


What is the difference between volume and load?

2 Answers   Gtech,


Suppose there are three modules A-B-C, the output of A is responsible for B and output of B is responsible for C and if A & C is not ready & B module is ready then how can u check Module B

4 Answers   TCS,






Have you heard about browser compatiblity? What is the latest version of Ie,Mozilla and Netscape?

4 Answers   Proteans,


What is the difference between latent and masked defects?

0 Answers  


why is testing necessary , explain with some examples?

6 Answers   Accenture,


What is CRUD testing

2 Answers   IBM,


in manual testing functional testing means to check the behviour of the appln.it is correct or let me know

4 Answers  


Hi, I need Quality Center user guide.Can any one tell from where I can get it? Thanks, Smita

2 Answers  


Tech round 1)joins 2)insert 3)delete 4)date 5)database architechture 6)bug life cycle 7)retesting 8)regression testing 9)somke and sanity testing Manager round 1)current organization details 2)explain current project 3)Basic unix comment 4)Test stragey

1 Answers   Thomson Reuters,


Categories