From an Employee table, how will you display the record
which has a maximum salary?
Answers were Sorted based on User's Feedback
Answer / debjani chakraborty
Select * from Employee where salary in(select max(salary)
from Employee);
Is This Answer Correct ? | 58 Yes | 2 No |
Answer / kavitha nedigunta
select * from emp e,(select max(sal) sal
from emp)a
where e.sal= a.sal;
select * from emp
where sal in(select max(sal) from
emp);
Is This Answer Correct ? | 29 Yes | 3 No |
Answer / pradeep sahoo
Select * from Employee where sal = (select max(sal) frpm
Employee)
Is This Answer Correct ? | 25 Yes | 1 No |
Answer / sharmila
Select * from Employee where salary in(select max(salary)
from Employee)
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / aruna parulekar
select * from employee where sal=(select max(sal) from
employee);
Is This Answer Correct ? | 14 Yes | 2 No |
Answer / kvsd
select * from employees where salary = (select max(salary)
from employees)
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / os reddy
select * from emp
where sal=(select max(sal) from emp);
OR
select * from emp
where sal in(select max(sal) from emp);
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / pradeep
To get nth rank salary or max salary two ways
below 5th
select ct , empno, sal from (SELECT max(rownum) ct , empno,
sal FROM emp group by empno, sal ORDER BY sal desc) where
ct =5;
below 2nd
select * from (
SELECT DEPTNO,ENAME,SAL,COMM,
RANK() OVER ( ORDER BY SAL DESC, COMM) poK from emp)
where pok =2;
Is This Answer Correct ? | 3 Yes | 1 No |
Write a query to genarate target column.Please answer me. Advance Thanks. Src Tgt Q10 Quarter to 2010 Q90 Quarter to 1990 Q80 Quarter to 1980 Q74 Quarter to 1974
What are the different datatypes available in PL/SQL?
How do I run a script in sql developer?
Do foreign keys improve performance?
Can we create a trigger on view?
Which sorts rows in sql?
What is a REF CURSOR? Compare strong and week ref cursor types.
Why do we use triggers?
How to disable a trigger name update_salary?
how can we write a column values horizontal by using sql stmt; ex: select name from table_name;(actual output) a b c d require output is a b c d
5 Answers Honeywell, Interact,
What do you mean by table in sql?
What is procedure function?