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


Write a query to find second highest salary of an employee.

Answers were Sorted based on User's Feedback



Write a query to find second highest salary of an employee. ..

Answer / preetir

select min(sal) from (select distinct sal from emp order by
desc where rownum < 2)

Is This Answer Correct ?    0 Yes 2 No

Write a query to find second highest salary of an employee. ..

Answer / arif saulat

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

Is This Answer Correct ?    0 Yes 2 No

Write a query to find second highest salary of an employee. ..

Answer / deepshikha

SELECT MAX (sal)
FROM emp a,
(SELECT MAX (sal) max_sal
FROM emp) abc
WHERE a.sal < abc.max_sal
ORDER BY sal DESC;

Is This Answer Correct ?    0 Yes 3 No

Write a query to find second highest salary of an employee. ..

Answer / vamana murthy

select ename,salary from emp
where rownum=2
order by salary desc

Is This Answer Correct ?    0 Yes 7 No

Write a query to find second highest salary of an employee. ..

Answer / amol londhe

Use the below Query:

Select Max(salary) from Emp
Where Max(salary) < (Select Max(salary) from emp
where emp-no=101);

Is This Answer Correct ?    10 Yes 18 No

Write a query to find second highest salary of an employee. ..

Answer / kitcat

SELECT salary
FROM (SELECT salary FROM emp
ORDER BY DESC salary)
WHERE RowNum=2

Is This Answer Correct ?    1 Yes 11 No

Write a query to find second highest salary of an employee. ..

Answer / jeff

select max(salary)
from Emp
where rownum < 2;

Is This Answer Correct ?    3 Yes 19 No

Post New Answer

More SQL PLSQL Interview Questions

What is the use of procedures?

0 Answers  


What is the difference between rollback and rollback to statements?

0 Answers  


how to enter binary numbers in sql statements? : Sql dba

0 Answers  


What are the two types of exceptions.

0 Answers  


Which one of the following is a reason that an INSERT statement might cause an error instead of executing correctly? 1. The INSERT statement was attempting to insert a record into a view that was created from more than one table. 2. The INSERT statement was attempting to insert a record using a combination of constants and values from an existing table. 3. The INSERT statement was attempting to insert a record with a non-NULL value into a table that has that column defined as NULL. 4. The INSERT statement was attempting to insert a record into a table by selecting a record from that same table. 5. The INSERT statement was attempting to insert a record into a view rather than a table.

1 Answers   Sonata,


What are pl/sql cursor exceptions?

0 Answers  


what is the boundary line in varrays?

1 Answers   HCL,


What is a crud api?

0 Answers  


what are the different types of joins?

4 Answers   Choice Solutions,


What is the limitation on the block size of pl/sql?

0 Answers  


What does varchar include?

0 Answers  


How do I clear the screen in sql plus?

0 Answers  


Categories