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 / shivaprasad

Hi Every one,this query will helps you to find 1st or 2nd or
3rd or and so on salary from the employee table.

change inside distinct top (3) for respective results

select distinct top 1 Salary from(select distinct top 3
Salary from Employee order by Salary DESC)temp order by
Salary;

Is This Answer Correct ?    1 Yes 0 No

find out the third highest salary?..

Answer / narendra

select max(company_id) from company where company_id <
(select max(company_id) from company where company_id <
(select max(company_id) from company))

Is This Answer Correct ?    1 Yes 0 No

find out the third highest salary?..

Answer / sabapathi

select sal from employee
where sal=(select min(sal) from employee
where sal>(select min(sal) from employee
where sal>(select min(sal) from employee)))

Is This Answer Correct ?    1 Yes 0 No

find out the third highest salary?..

Answer / mohd. rashid

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

Is This Answer Correct ?    1 Yes 0 No

find out the third highest salary?..

Answer / ravindra

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 0 No

find out the third highest salary?..

Answer / santhoshkumar

select name,salary from emp where salary=(select min(sal)
from (select distinct TOP 3(salary) from emp order by
salary desc;

Is This Answer Correct ?    5 Yes 5 No

find out the third highest salary?..

Answer / ram pravesh

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

Is This Answer Correct ?    2 Yes 2 No

find out the third highest salary?..

Answer / pardeep kumar

This is the Simplest One
Let i have a Column named EmpSal in Tbale Named tbEmp


Select Min(EmpSal) from tbEmp where EmpSal IN(Select
Distinct Top 3 EmpSal from tbEmp ORDER BY EmpSal DESC)

Is This Answer Correct ?    1 Yes 1 No

find out the third highest salary?..

Answer / ashok naik

In Sql server:
Select top 1 ThirdHighest.salary from(
Select distinct top 3 salary from employee order by salary
desc) as ThirdHighest

--example for 4th highest salary in above query put 4
inplace of 3

--example for 5th highest salary in above query put 5
inplace of 3
--and so on for nth highest

Is This Answer Correct ?    1 Yes 1 No

find out the third highest salary?..

Answer / harikrishna ravipati

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

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

How to delete an existing row from a table in oracle?

0 Answers  


What are the sql clauses supported in the link property sheet ?

1 Answers   Oracle,


What is partitioned table in Oracle?

0 Answers   MCN Solutions,


How can I create database in oracle?

0 Answers  


SQL> CREATE TABLE to_table 2 (col1 NUMBER); Table created. SQL> CREATE OR REPLACE TRIGGER statement_trigger 2 AFTER INSERT ON to_table 3 BEGIN 4 DBMS_OUTPUT.PUT_LINE('After Insert Statement Level'); 5 END; 6 / Trigger created. SQL> CREATE OR REPLACE TRIGGER row_trigger 2 AFTER INSERT ON to_table 3 FOR EACH ROW 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('After Insert Row Level'); 6 END; 7 / Trigger created. SQL> INSERT INTO TO_TABLE VALUES(1); After Insert Row Level After Insert Statement Level 1 row created. SQL> BEGIN 2 INSERT INTO TO_TABLE VALUES(2); 3 INSERT INTO TO_TABLE VALUES(3); 4 INSERT INTO TO_TABLE VALUES(4); 5 INSERT INTO TO_TABLE VALUES(5); 6 INSERT INTO TO_TABLE VALUES(6); 7 INSERT INTO TO_TABLE VALUES(7); 8 INSERT INTO TO_TABLE VALUES(8); 9 INSERT INTO TO_TABLE VALUES(9); 10 INSERT INTO TO_TABLE VALUES(0); 11 END; 12 / WAT LL BE THE O/P??? XPLAIN IT>>>>

1 Answers   Infosys,


What are the extensions used by oracle reports?

0 Answers  


How to use attributes of the implicit cursor in oracle?

0 Answers  


How to insert multiple rows with one insert statement in oracle?

0 Answers  


What is blob datatype?

0 Answers  


what are steps for interface? where is exchange rate defined in which table?

0 Answers  


What are the advantages of oracle 12c?

0 Answers  


What operating systems are supported by oracle database 10g xe?

0 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)