Gary Li
Gary Li

Reputation: 411

min function in PL/SQL

I want to choose the min value in two date ,such as

c := min(a,b);

It occupy compiler error :

Error(20,10): PLS-00103: Encountered the symbol "," when expecting one of the following:
. ( ) * @ % & - + / at mod remainder rem || multiset

I know we can use aggregate function Min in the SQL. I dan't whether there is the similar func i can use i pl/sql?

Upvotes: 8

Views: 9103

Answers (2)

reza
reza

Reputation: 1

LEAST("ColumnName", _NumberOfRows)

Example: For the Minimum 5 Rows = LEAST(Price,5)

Upvotes: -2

Paul Hanbury
Paul Hanbury

Reputation: 981

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

Upvotes: 22

Related Questions