Home >> MySql >> How To Find Second Highest Salary in MySql

How To Find Second Highest Salary in MySql

Employee Table

Name              Salary
----------------------------
Raj                  200000
Ravi                10000
Ram                30000
Suresh            400000

Method 1:

SELECT * FROM employee GROUP BY salary ORDER BY salary DESC LIMIT 1,1;

Post Your Comment

Next Questions
How To Find Nth Highest salary
How to calculate number of days between two dates
Calculate days between two dates
How to Find the Number of Days Between Two Dates
How to Find the Number of Days Between Current Date to Specific Date
How much query taking long time to execute
How to Identify Performance Issues with Slow Queries
Using results from one query to use in another query
Using Output from one Query in a different Query
How to update a column with another column value from same table
How to update a column with another tables columns value
Updating one table row from another table row
Update columns values with column of another table based on condition
How to insert data in one table from another table
How to copy data from one table to another table
How to concatenate two columns into one
How to concatenate two columns into one with the existing column name
How to Concatenate Multiple Rows into One Column
How to Concatenate Multiple Rows into One Column Using Group BY
How to set GROUP_CONCAT separator
How to count duplicate rows
How to count the number of duplicate entries a column
How To Find Duplicate Values
How to Find Duplicate Records
Count duplicates records

Copyright ©2022 coderraj.com. All Rights Reserved.