Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


find out the third highest salary?

Answers were Sorted based on User's Feedback



find out the third highest salary?..

Answer / swaminathan

select *
from (select distinct sal from emp order by sal desc)
where rownum <= 3

Is This Answer Correct ?    9 Yes 13 No

find out the third highest salary?..

Answer / rakesh sharma

order by
credit desc

Is This Answer Correct ?    0 Yes 4 No

find out the third highest salary?..

Answer / order by sal

select (sal) as sal from employee

Is This Answer Correct ?    0 Yes 4 No

find out the third highest salary?..

Answer / amitabh sharma

Here are 2 queries for finding 3rd highest salary:

select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);


SELECT * FROM
(
SELECT Ename, SAL, dense_Rank() OVER (ORDER BY SAL DESC )
RANKNEW FROM EMP)
WHERE RANKNEW = 3

Regards,
Amitabh Sharma

Is This Answer Correct ?    1 Yes 5 No

find out the third highest salary?..

Answer / ruchira

select sal from emp
where sal =
(select sal from
(select distinct sal from emp OrderBy sal desc)
[table alias] where rownum < 4 )

Is This Answer Correct ?    1 Yes 5 No

find out the third highest salary?..

Answer / sapna rawal

SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC)
ORDER BY salary ;

n=3.In this case.

Is This Answer Correct ?    1 Yes 5 No

find out the third highest salary?..

Answer / anirban mitra

SELECT MAX(SAL) FROM EMP WHERE SAL NOT IN (SELECT MAX(SAL)
FROM EMP UNION SELECT MAX(SAL) FROM EMP WHERE SAL NOT IN
(SELECT MAX(SAL) FROM EMP))

Is This Answer Correct ?    2 Yes 7 No

find out the third highest salary?..

Answer / nagaraj a h

SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT
(DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);

Is This Answer Correct ?    0 Yes 5 No

find out the third highest salary?..

Answer / dayaram & sarfaraz (dost)

select a.empno,a.ename,a.sal from emp a
where &n = (select count(distinct(b.sal)) from emp b where
b.sal>= a.sal

Is This Answer Correct ?    0 Yes 5 No

find out the third highest salary?..

Answer / asadullahrao

select max(sal) from emp where sal<(select max(sal) from
emp where sal<(select max(sal) from emp))

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Oracle General Interview Questions

How would you extract DDL of a table without using a GUI tool?

1 Answers  


Is it possible to set second Primary Key Constraint in a table in Oracle Database ?

0 Answers   MCN Solutions,


Differentiate between function and procedure in oracle.

0 Answers  


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

1 Answers  


what is IDE,DMV in sql server?

0 Answers  


Can a View based on another View ?

3 Answers  


How to convert a date to char in oracle? Give one example.

0 Answers  


How to connect to a local oracle 10g xe server?

0 Answers  


What is a Data Dictionary ?

5 Answers  


Write a simple Store procedure and pass parameter to it ?

3 Answers   Keane India Ltd,


How to view existing locks on the database?

0 Answers  


how to tune oracle sql queries pls tell me step by step. urgent pls

1 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • 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)