Home >> MySql >> How to select data where a field has a min value in MySql

How to select data where a field has a min value in MySql

Find a minimum value for a certain column.

Example-1

SELECT MIN(price) FROM products

Example-2

Employee Table

Name              Salary
Raj                  200000
Ravi                10000
Ram                30000
Suresh            400000

Solution

SELECT MIN(salary) FROM employee;
 
Output
10000

Post Your Comment

Next Questions
Select row with min value in GROUP BY
Select Rows with min value for each group
How to Find a maximum value for a certain column value
How to select data where a field has a max value
Select row with max value in GROUP BY
Select Rows with max value for each group
How to find the sum of values in a column
How do you find the sum of all the values in a column
How to find absolute value of a column
How do I get the absolute value of a column
How to find round value
How to get rounded data
How to find square root of a number
How to find the greatest value in a list
How to find the least value in a list
How To Find e raised to the power of the specified number
How to find a value extracted from a date
How to find a value extracted from a date or datetime
How to find a value extracted from an internal value

Copyright ©2022 coderraj.com. All Rights Reserved.