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 |
What does `(+)` do in a where clause?
How many types of database triggers exist?
Shall I get Pro*C Compiler in Oracle-10g release ?
What are the built-in functions used for sending Parameters to forms ?
What is the fastest query method to fetch data from the table?
Hi all, Can any one give answer for this question. Suppose im having employee table with fields, eno, ename, dept, address1, address2, address3. In address field employee can fill only address1 or address2 or address3... at a time he can fill three address fields. now i want all employee names who filled only one address field.. Plz its urjent can any one give querry.. Thanks in advance.
what is pragma?
Explain compound trigger in oracle?
What is different types of joins?
What is difference between Rename and Alias?
Please explain compound trigger in oracle?
What are privileges and grants?