How to select the name of employee who is getting maximum
sal with out using subquery

Answers were Sorted based on User's Feedback



How to select the name of employee who is getting maximum sal with out using subquery..

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

How to select the name of employee who is getting maximum sal with out using subquery..

Answer / srinu.g

select b.ename from emp b,(select max(sal) k from emp) a
where a.k=b.sal;

Is This Answer Correct ?    2 Yes 0 No

How to select the name of employee who is getting maximum sal with out using subquery..

Answer / naidu

SELECT * FROM Emp
WHERE LEVEL=&Number
CONNECT BY PRIOR Sal > Sal ;

Is This Answer Correct ?    0 Yes 0 No

How to select the name of employee who is getting maximum sal with out using subquery..

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

How to select the name of employee who is getting maximum sal with out using subquery..

Answer / niladri chatterjee

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

How to select the name of employee who is getting maximum sal with out using subquery..

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

How to select the name of employee who is getting maximum sal with out using subquery..

Answer / neha

select a.ename from (select ename from emp ORDER BY SAL
desc,ROWNUM DESC)a
where rownum=1;

Is This Answer Correct ?    0 Yes 1 No

How to select the name of employee who is getting maximum sal with out using subquery..

Answer / lince

select top 1 Name from emp order by sal desc

Is This Answer Correct ?    8 Yes 11 No

How to select the name of employee who is getting maximum sal with out using subquery..

Answer / atal patra

select ename,max(sal)from emp group by ename;

Is This Answer Correct ?    6 Yes 9 No

How to select the name of employee who is getting maximum sal with out using subquery..

Answer / pavan

select * from (select ename from emp order by rownuum desc)
where rownum=1;

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Oracle General Interview Questions

What does `(+)` do in a where clause?

1 Answers  


How many types of database triggers exist?

0 Answers  


Shall I get Pro*C Compiler in Oracle-10g release ?

1 Answers  


What are the built-in functions used for sending Parameters to forms ?

0 Answers   Oracle, TCS,


What is the fastest query method to fetch data from the table?

0 Answers  






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.

4 Answers   JPMorgan Chase,


what is pragma?

2 Answers  


Explain compound trigger in oracle?

0 Answers  


What is different types of joins?

0 Answers  


What is difference between Rename and Alias?

1 Answers  


Please explain compound trigger in oracle?

0 Answers  


What are privileges and grants?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)