Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is IF ELSE statement can be used inside sqlplus?
> What i want to accomplish is i want to evaluate returned value from the
> function.
>
> I know if then else is an pl/sql not sql so i post the question here.just
in
> case anybody has ever done it before.
>
> declare
> myout number;
> Begin
> myout:=func_get_valid_answer;
> if myout equal to true(certain number) then
> exit from this sqlplus session with exit code 0
> if myout equal to false then
> exit from this sqlplus session with exit code 1
> End;
>
where's your "END IF"? Looks like its a syntax error...
IF condition1 THEN
sequence_of_statements1
ELSIF condition2 THEN
sequence_of_statements2
ELSE
sequence_of_statements3
END IF;
![]() |
![]() |