Oracle Tutorial

What is Oracle
SQL Keywords

Oracle Wildcards

Oracle Wildcards

Oracle Aliases

Oracle Aliases

MySQL Tutorial

MySQL Tutorial

PL/SQL Tutorial

PL/SQL Tutorial

Oracle Interview Questions

Oracle Interview Questions and Answers


Oracle max() Function

The Oracle max() function returns the maximum or largest value from specific field. It is used when you need to find largest value from fields value.

Oracle MAX FUNCTION Syntax

To find maximum or largest value from specific field in a table, use the following syntax:

Syntax

SELECT MAX(col1) 
FROM tablename
WHERE condition;

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.

Oracle MAX FUNCTION example

The following Oracle, find maximum or largest value of the numeric field "workingHours" in the "tblCustomerLoan" table:

Example

SELECT MAX(workingHours) AS MinHover FROM tblCustomerLoan;

Note:

In the above example, we are finding maximum or largest value from "workingHours" numeric field in tblCustomerLoan" table.