Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

min function in PL/SQL

Tags:

sql

oracle

plsql

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?

like image 937
Gary Li Avatar asked Apr 12 '11 04:04

Gary Li


1 Answers

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

like image 172
Paul Hanbury Avatar answered Nov 12 '22 08:11

Paul Hanbury