Min in PL / SQL

I want to select the min value in two dates, for example

c := min(a,b); 

Takes a compiler error:

Error (20.10): PLS-00103: The "," character is encountered, expecting one of the following:
, () * @% and - + / in rem there remains rem || multiset

I know that we can use the aggregated Min function in SQL. I do not know if there are similar functions, can I use pl / sql?

+6
source share
2 answers

In PLSQL, the least function returns the smallest value in a list of expressions.

+18
source

LEAST("ColumnName", _NumberOfRows)

Example: for a minimum of 5 lines = LEAST(Price,5)

-1
source

Source: https://habr.com/ru/post/885699/


All Articles