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 find the second highest salary from emp table?

Answers were Sorted based on User's Feedback



how to find the second highest salary from emp table?..

Answer / amol

select MAX (sallary) from emp where sallary<=(select MAX(sallary) from emp)

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / chandan

select slary from emp order by slary desc limit 1,1;

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / tarun

SELECT salary FROM tb_salary ORDER BY salary DESC LIMIT 2,1

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / parvezkhan pathan

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

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / sai

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

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / praveen

SELECT MAX(Salary) as 'Salary' from EmployeeDetails
where Salary NOT IN
(
SELECT TOP 1 (SALARY) from EmployeeDetails ORDER BY Salary Desc
)

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / pankaj kumar

SELECT filedname
FROM tablename
ORDER BY fieldname DESC
LIMIT 2 , 1

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / latha l

Select level,Max(sal) from emp
Where level=&level connect by prior sal>sal
group by level;


ENTER THE LEVEL MANUALLY

EX:Enter value for level: 2

YOU GET SECOND MAXIMUM SALARY.

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / nitin

select max(salary) from emp where salary<>(select
max(salary) from emp);

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary from emp table?..

Answer / chiru

select distinct sal from emp e where 2=(select
count(distinct sal) from emp where e1.sal>e.sal) order by
sal desc;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

How to revise and re-run the last sql command?

0 Answers  


What are the different type of joins in sql?

0 Answers  


What is keys and its types?

0 Answers  


What is a trigger word?

0 Answers  


How to display Row Number with Records in Oracle SQL Plus?

0 Answers   MCN Solutions,


ename empno deptno amar 1 10 akbar 2 20 anthonny 3 30 jonathan 4 40 write a procedure to dispaly the column values ina row separated by a deleimiter eg - input - select ename from emp '|' output - amar|akbar|anthony|jonathan input - select empno from emp '@' o/p - 1@2@3@4 input - select deptno from emp '/' o/p - 10/20/30/40 Pls answer this questn.

2 Answers  


What is database migration?

0 Answers  


What is the max nvarchar size?

0 Answers  


What do you mean by field in sql?

0 Answers  


What is sql*loader and what is it used for? : aql loader

0 Answers  


7. Where would you look for errors from the database design?

1 Answers   Fintellix,


Can I create table without primary key?

0 Answers  


Categories