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 are the benefits of pl sql?

0 Answers  


What is correlated sub-query?

7 Answers   Oracle,


How many joins can you have in sql?

0 Answers  


I need a function for a train ticket reservation please answer it thanks in advance

0 Answers  


what is the cursor and use of cursor in pl/sql ?

4 Answers  


What are operators available in sql?

0 Answers  


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

0 Answers  


table name: prod there are three fields in the table that are 1.proddate 2.prodQty 3.model Day wise prodQty is stored in the table prod write a query to display total prodqty in the year 2004 april.

2 Answers   Maruti Suzuki,


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

0 Answers  


How are sql commands classified?

0 Answers  


What will you get by the cursor attribute sql%found?

0 Answers  


How do I quit sql?

0 Answers  


Categories