How to select the name of employee who is getting maximum
sal with out using subquery
Answers were Sorted based on User's Feedback
Answer / girija.112
ANS :
select max(ename) keep (dense_rank last order by sal) ename
from emp
ENAME
-----
KING
| Is This Answer Correct ? | 8 Yes | 4 No |
Answer / naidu
SELECT * FROM Emp
WHERE LEVEL=&Number
CONNECT BY PRIOR Sal > Sal ;
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / naresh
Here is the solution.
Select E_id, E_name,Salary from the Employes group by E_ID
Having Salary=Max(Salary)
Should work.
Try it and let me know.
Cheers!
Naresh
| Is This Answer Correct ? | 0 Yes | 0 No |
Select * From (Select * From Employee Order By Salary Desc) a
Where rownum=1 ;
Or
Select * From (Select Emp_id, Emp_NM, Salary From Employee Order By Salary Desc) a
Where rownum=1 ;
Based on Oracle 11g.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / flitchner
select name from (select max(sal) as salary from emp) a,
emp b
where a.salary = b.sal;
| Is This Answer Correct ? | 0 Yes | 1 No |
select ename,max(sal)from emp group by ename;
| Is This Answer Correct ? | 6 Yes | 9 No |
How different is ms access and oracle?
In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col
What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ?
How to delete a user account in oracle?
How to create an oracle testing table?
What is mean by Program Global Area (PGA) ?
Difference between NO DATA FOUND and %NOTFOUND?
What are the type of Synonyms?
How do you rate yourself in oracle and sql server ?
Hi friends can u send the oracle 9i full version download link?????????????? please reply ?
I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?
how to create a new database in oracle?