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

Why do you create or replace procedures rather that drop and recreate.

0 Answers  


what are stored procedures?

7 Answers   TCS, Wells Fargo,


What is a heap related to database ?

1 Answers   TCS, University of Edinburgh,


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

0 Answers  


What is a relational database management system?

0 Answers  






What is the difference between a user and a schema in oracle?

0 Answers  


What is different bet native dynamic sql and Dbms_Sql?

4 Answers   Thermotech,


What is a Sequence ?

3 Answers  


What are the attributes that are found in a cursor?

0 Answers  


What is Undo Management Advisor in Oracle?

0 Answers   MCN Solutions,


What is the difference between primary key and unique key and foreign key in oracle?

0 Answers  


How can we force the database to use the user specified rollback segment?

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)