This Oracle tutorial explains how to use the Oracle/PLSQL LEAST function with syntax and examples.
The Oracle/PLSQL LEAST function returns the smallest value in a list of expressions.
The syntax for the LEAST function in Oracle/PLSQL is:
The first expression to evaluate whether it is the smallest.
Optional. Additional expressions that are to be evaluated.
The LEAST function returns a value that is the same datatype as expr1. Having a NULL value in one of the expressions will return NULL as the least value.
The LEAST function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle LEAST function examples and explore how to use the LEAST function in Oracle/PLSQL.
For example: