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 |
Explain the difference between a procedure and a function?
What is Trigger in Oracle?
There are three tables : E : EID,ENAME D : DID,DNAME empdept : eid, did select the employees who doesn't belong to any dep
what is kernel?
write a query to count number of alphabets in given string for example "APPLE" write a query to generate sequence from 50 to 100 write a query to display in single string "ABCD,EFGH,IJKL,PQRS"
Give SQL Query to find the number words in a sentence ? ex: 'ram charan singh' then ans:3 Answer:select length(trim('ram charan singh')) - length (replace (trim ( 'ram charan singh'),' ','')) +1 from dual The above query working properly when space between the words is only one &similar But ,If the space between the words is nonuniform. Ex:'ram charan singh is good' ans:5 i am not getting this answer using above query.
What is a deadlock ? Explain .
how to tune oracle sql queries pls tell me step by step. urgent pls
how to get the second max val for every group in a table
How to sort output in descending order in oracle?
Write a syntax for update query in oracle?
Define Transaction ?