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 second highest salary?

Answers were Sorted based on User's Feedback



find out the second highest salary?..

Answer / digvijay

select max(salary) from emp where salary < Top Salary

Is This Answer Correct ?    0 Yes 0 No

find out the second highest salary?..

Answer / prem

SQL> select salary from(select salary,rownum a from(select salary from employee order by salary desc))where a=2;

Is This Answer Correct ?    0 Yes 0 No

find out the second highest salary?..

Answer / souri sengupta

select max(salary) from employee where salary not in (select max(salary) from employee);


This worked :)

Is This Answer Correct ?    0 Yes 0 No

find out the second highest salary?..

Answer / sujeet sinha

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

Is This Answer Correct ?    1 Yes 1 No

find out the second highest salary?..

Answer / mukesh

Second highest Value

select max(user_id) from users
where user_id < (select max (user_id) from users)


Mukesh Narayan SIngh
09873595976
mukeshnsingh22@gmail.com

Is This Answer Correct ?    1 Yes 1 No

find out the second highest salary?..

Answer / mahendra

SELECT max(salary) FROM Employee WHERE salary NOT IN
(SELECT max(salary) FROM Employee);

Is This Answer Correct ?    1 Yes 1 No

find out the second highest salary?..

Answer / asit kumar sahu

SELECT DISTINCT SAL FROM EMP E1
WHERE 2=(SELECT COUNT(DISTINCT SAL) FROM EMP E2
WHERE E1.SAL <= E2.SAL);

OUTPUT= 3000

Is This Answer Correct ?    0 Yes 0 No

find out the second highest salary?..

Answer / new

select max(salary) from users where salary not in (select max(salary) from users)

Is This Answer Correct ?    0 Yes 0 No

find out the second highest salary?..

Answer / elumalai d

SELECT * FROM (SELECT salary FROM emp ORDER BY salary DESC) WHERE ROWNUM<3;

Is This Answer Correct ?    0 Yes 0 No

find out the second highest salary?..

Answer / elumalai d

CREATE TABLE emp(ID NUMBER(10),NAME VARCHAR2(100),salary NUMBER(10));

INSERT INTO emp VALUES(100,'Steven',40000);
INSERT INTO emp VALUES(101,'Smith',30000);
INSERT INTO emp VALUES(102,'Ranshow',70000);
INSERT INTO emp VALUES(103,'Handscomp',20000);
INSERT INTO emp VALUES(104,'Mitchel',10000);
INSERT INTO emp VALUES(105,'Clarke',90000);
INSERT INTO emp VALUES(106,'Ponting',50000);
INSERT INTO emp VALUES(107,'Clarke',80000);
INSERT INTO emp VALUES(108,'Marsh',60000);
COMMIT;

SELECT salary FROM emp ORDER BY salary DESC;

--Records
--======
90000
80000
70000
60000
50000
40000
30000
20000
10000

SELECT min(salary) FROM (SELECT salary FROM emp ORDER BY salary DESC) WHERE ROWNUM<3;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

How can we view last record added to a table?

0 Answers  


There are three tables : E : EID,ENAME D : DID,DNAME empdept : eid, did select the employees who doesn't belong to any dep

4 Answers   Microsoft,


What is a user account in oracle?

0 Answers  


What happens to the indexes if a table is recovered?

0 Answers  


What is Partitions in Table ?

2 Answers   Atiric Software,


Are truncate and delete commands same? If so why?

0 Answers  


is there a tool to trace queries, like profiler for sql server?

0 Answers  


hi friends, I have a table A col as status|NUM and value as open |1 open |2 close |3 close |3 the O/P should be open|close 1 |3 2 |4

1 Answers   CTS,


Explain the concept of the DUAL table.

2 Answers  


How are the index updates?

1 Answers  


Why we choose emp number as primarykey?

4 Answers  


Explain joins in oracle?

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)