plsql - How to call a sql function? -
i have written function minimum2 take 2 numbers arguments , returns minimum number. function compiles without error. when call function minimum(1,2);
errors pls-00103. here function , function call:
create or replace function minimum2(v1 number, v2 number) return number begin if v1 < v2 return v1; else return v2; end if; end; --i call function asl follow minimum2(1,2);
what did wrong? wrote code in sql developer
you need run select
select minimum2(1,2) dual
you need end function /
:
for details on how , why use /
see here
are aware there built-in function that?
select least(1,2) dual
Comments
Post a Comment