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
Answer / sujan thota
select name from emp where sal=(select max(sal) from emp)
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / varun b n
select * from emp where sal = (select Max(sal) from emp)
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / n. pavankumar
select * from emp where sal in (select max(sal) from emp)
| Is This Answer Correct ? | 2 Yes | 2 No |
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 |
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 |
HOw to give special characters to password
How would you define a "bug?"
What is Black Phase in SDLC?
plz anyone can explain me what is PB/MF based application?
If you're given a program that will average student grades, what kinds of inputs would you use?
what is defect?
what is mean by impact analysis ,how we used to select regression TC using this?
Test case's for a window having 4 button's addition, subdtraction, multiplication,division of two numbers having two no range(0,10000) and result box having range between (100,100000).
What is the difference between a bug, a defect and an error?
What is Soak Testing ?
can anybody pls tell me that what type of interaction takes place or what type of discussions or questions take place between a tester and client regarding the project.
What is Configuration management? Tools used?