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 out the second largest element from mysql table

Answers were Sorted based on User's Feedback



How to find out the second largest element from mysql table..

Answer / neelesh jain

LIMIT <n> == n rows will be returned
OFFSET <n> == skip n rows of the query result

SELECT Salary FROM Employee ORDER BY Salary DESC LIMIT 1
OFFSET 1;

so above query skip 1 element (as offset is 1), which is
biggest and returned 1 elemetn which is 2nd largest value.

Is This Answer Correct ?    0 Yes 0 No

How to find out the second largest element from mysql table..

Answer / harish varma

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

Is This Answer Correct ?    0 Yes 0 No

How to find out the second largest element from mysql table..

Answer / prashant chaudhary

select top 1 * from ( select top 3 * from Student_Info
order by marks desc)table1 order by marks

Is This Answer Correct ?    5 Yes 6 No

How to find out the second largest element from mysql table..

Answer / shanmukha

select min(salary) from Employee where salary in(select
distinct top 2 salary from Employee order by salary desc )

This is the query to find second maximum salary in MSSQL

Is This Answer Correct ?    0 Yes 1 No

How to find out the second largest element from mysql table..

Answer / sivsankar.ponnurangam

select project_id from tbl_project order by project_id
desc limit 2,1

Is This Answer Correct ?    21 Yes 42 No

Post New Answer

More MySQL Interview Questions

How do I find mysql database?

0 Answers  


What is prepared statement in mysql?

0 Answers  


what is constraints?

0 Answers  


What does innodb stand for?

0 Answers  


Why does mysql have so many connections?

0 Answers  


How do I disable mysql?

0 Answers  


Can we join 3 tables in mysql?

0 Answers  


How to display top 50 rows?

0 Answers  


maximum database size of mysql database

2 Answers  


In the below example, how many String Objects are created? String s1="I am Java Expert"; String s2="I am C Expert"; String s3="I am Java Expert";

1 Answers  


What is the difference between truncate and delete?

0 Answers   DELL,


How you will Show unique records.

0 Answers  


Categories