The MySQL max() function returns the maximum or largest value from specific field. It is used when you need to find largest value from fields value.
To find maximum or largest value from specific field in a table, use the following syntax:
Parameters:
tablename: The table name from which you want to fetch records.
col1: The column or field name from which the maximum or largest value will be return.
condition: To specifies the conditions that must be fulfilled. It is optional.
Note:
In the above example, we are finding maximum or largest value from "workingHours" numeric field in tblCustomerLoan" table.
You can use MySQL Command Line Client to find maximum or largest value from the fields in the specified table. It will look like this: