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...


How to Select second Maximum salary in a Table ?

Answers were Sorted based on User's Feedback



How to Select second Maximum salary in a Table ?..

Answer / guest

select max(sal) from Table
where sal not in(select max(sal) from Table);

Is This Answer Correct ?    20 Yes 3 No

How to Select second Maximum salary in a Table ?..

Answer / tanuj tewari

select max(sal) from table_name where sal<(select max(sal)
from table_name);

Is This Answer Correct ?    15 Yes 3 No

How to Select second Maximum salary in a Table ?..

Answer / sunil

select max(sal) from table_name where
sal<(select max(sal) from table_name);

or

select sal from(select sal,dense_rank() over(order by sal)
as rnk from table_name) where rnk=2;

Is This Answer Correct ?    7 Yes 4 No

How to Select second Maximum salary in a Table ?..

Answer / abhijit

select max(sal) from table_name where
sal<(select max(sal) from table_name);

or

select sal from(select sal,dense_rank() over(order by sal
desc)
as rnk from table_name) where rnk=2;

Is This Answer Correct ?    3 Yes 1 No

How to Select second Maximum salary in a Table ?..

Answer / ranjini

select max(salary) from employee not exists (select
max(salary)from employee)

Is This Answer Correct ?    0 Yes 1 No

How to Select second Maximum salary in a Table ?..

Answer / arpit sachan

select min(Emp_Sal)from Employee_Test where Emp_sal in(select distinct top(2) Emp_Sal from Employee_Test order by Emp_Sal desc)

Is This Answer Correct ?    0 Yes 1 No

How to Select second Maximum salary in a Table ?..

Answer / ranjith

select salary from table order by salaray desc limit 1,1

Is This Answer Correct ?    0 Yes 1 No

How to Select second Maximum salary in a Table ?..

Answer / kuldeep singh

select max(sal) from emp where sal not in (select top2 sal from emp order by sal desc)

Is This Answer Correct ?    1 Yes 3 No

How to Select second Maximum salary in a Table ?..

Answer / sephali

select sal, rownum
from (select sal from table
order by sal desc)
where rownum=2

Is This Answer Correct ?    0 Yes 2 No

How to Select second Maximum salary in a Table ?..

Answer / 9896012055

what will be the answer for this question

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Oracle General Interview Questions

Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

0 Answers   TCS,


When do we use group by clause in a sql query?

0 Answers  


What is integrity and what is constraint??Explain with example

0 Answers   Google,


What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ?

1 Answers  


Explain the use of Merge statement in oracle 11g

0 Answers   Infosys,


Explain the family trees and connection by clause

0 Answers  


Can a Tablespace hold objects from different Schemes ?

3 Answers  


i can't insert column value greater than 4000 characters at one instance even i am using CLOB datatype . how to insert efficiently more than 4000 characters ? And please let me know how to impose inline and out-of line constraints on oracle column??? Thanks in Advance... Prakash

2 Answers  


What is data block in Oracle?

0 Answers   MCN Solutions,


How to export data with a field delimiter?

0 Answers  


What is tns entry?

0 Answers  


Difference between the “verify” and “feedback” command?

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)