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

How to create a new table in mysql?

0 Answers  


What ascii 31?

0 Answers  


What are the functions used to encrypt and decrypt the data present in mysql?

0 Answers  


How to use like conditions?

0 Answers  


Why mysql is so popular?

0 Answers  


How do I edit a table in mysql workbench?

0 Answers  


What command is used to delete the data from the table without deleting the table structure?

0 Answers  


What is the difference between primary and unique key

5 Answers   CSC,


Where is mysql data stored?

0 Answers  


What is the difference between a Table and a View?

3 Answers  


How to Join tables on common columns.

0 Answers  


Which command is used to view the content of the table in mysql?

0 Answers  


Categories