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 we can find nth max salary from an employe table by
using my sql?

Answers were Sorted based on User's Feedback



how we can find nth max salary from an employe table by using my sql?..

Answer / pious deepak

select salary from employee
order by salary desc limit n-1, 1

Is This Answer Correct ?    29 Yes 4 No

how we can find nth max salary from an employe table by using my sql?..

Answer / whatinaname

select max(salary) from employee
order by salary desc limit n-1, 1

Is This Answer Correct ?    14 Yes 2 No

how we can find nth max salary from an employe table by using my sql?..

Answer / ksam

select distinct(salary) from employee order by salary desc
limit n-1,1

Is This Answer Correct ?    6 Yes 2 No

how we can find nth max salary from an employe table by using my sql?..

Answer / nivedita

select max(salary) from employee order by salary desc limit 1;

Is This Answer Correct ?    3 Yes 0 No

how we can find nth max salary from an employe table by using my sql?..

Answer / jithu

Another way is::

SELECT sal FROM sal a WHERE n = ( SELECT count(*) FROM sal
b WHERE b.sal < a.sal)

Is This Answer Correct ?    4 Yes 2 No

how we can find nth max salary from an employe table by using my sql?..

Answer / sumit

select salary from employee e1
where (n-1)=(select count(*) from employee where
salary>e1.salary)

Is This Answer Correct ?    0 Yes 2 No

how we can find nth max salary from an employe table by using my sql?..

Answer / sandeep

select MAXIMUM(salary) from (select salary from employee
order by salary desc limit 'n')

n means number of rows

Is This Answer Correct ?    10 Yes 18 No

how we can find nth max salary from an employe table by using my sql?..

Answer / sandeep kumar

select salary from eployee

Is This Answer Correct ?    4 Yes 22 No

Post New Answer

More MySQL Interview Questions

What is the difference between a Table and a View?

3 Answers  


about foregine

2 Answers  


What is int mysql?

0 Answers  


How can you increase the performance of mysql select query?

0 Answers  


What is dump in mysql?

0 Answers  


How do I free up space in mysql?

0 Answers  


What is a user defined variable?

0 Answers  


What is the difference between unix timestamps and mysql timestamps?

0 Answers  


What is blob storage?

0 Answers  


How MySQL is different from SQL?

17 Answers   HCL, IBM,


What is mysql_pconnect?

0 Answers  


Where is mysql installed on linux?

0 Answers  


Categories