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 / mihir nasikkar

Here n is 3


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

Is This Answer Correct ?    2 Yes 0 No

find out the third highest salary?..

Answer / gayathri

if you compare the salary slip u can find

Is This Answer Correct ?    3 Yes 1 No

find out the third highest salary?..

Answer / karunakar varma

select a,sal from (select dense_rank() over (order by sal
desc) a,sal from emp) where a=3

Is This Answer Correct ?    4 Yes 2 No

find out the third highest salary?..

Answer / abbas

SELECT * FROM
(
SELECT EMPLOYEECODE, SAL, Rank() OVER (ORDER BY SAL DESC )
RANKNEW FROM EMPLOYEE)
WHERE RANKNEW = 3

Is This Answer Correct ?    9 Yes 8 No

find out the third highest salary?..

Answer / mahesh

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

Is This Answer Correct ?    11 Yes 10 No

find out the third highest salary?..

Answer / nirad

select Top 1 *
from ( select top 3 * from Customer order by salary desc )
tempt
order by salary asc


if you want third lowest just desc with asc and asc with
desc and even if you want 2 or other hight value just
change inner query value of 3

Is This Answer Correct ?    3 Yes 2 No

find out the third highest salary?..

Answer / chinmaya

Select Top 1 Sal from (Select Top 3 Sal from emporder by
Sal desc) x order by Sal

Is This Answer Correct ?    1 Yes 0 No

find out the third highest salary?..

Answer / vanaja

select * from emp5 where salary in(select min(salary) from
emp5 where salary in(select top 3 salary from emp5 order by
salary desc))

Is This Answer Correct ?    1 Yes 0 No

find out the third highest salary?..

Answer / sam

Guys
See the correct answer.

select distinct sal from emp a where 4 =(select
count(distinct(sal)) from emp where a.sal <= sal)

Is This Answer Correct ?    2 Yes 1 No

find out the third highest salary?..

Answer / ajit

SQL QUERIES FOR FINDING Nth HIGHEST SALARY

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

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Oracle General Interview Questions

What is the difference between online and offline backups?

0 Answers   MCN Solutions,


I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance

0 Answers   Cisco,


What is a public synonym?

1 Answers  


What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.

0 Answers   MCN Solutions,


Explain database link?

0 Answers  


5. Display full details for the creditor/s who has received the single largest payment. Do not use a table join or set operator anywhere in your query.

6 Answers   Wipro,


How to store pictures on to the database?

0 Answers  


what is difference between DBMS and RDBMS?

2 Answers   Metric Stream,


what is the scripts in data base?

0 Answers  


Please explain joins in oracle?

0 Answers  


How to select some rows from a table in oracle?

0 Answers  


What is pragma restrict_reference in oracle 9i?When we use this?Give me one realtime scenario?

4 Answers   Microsoft, Wipro,


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