DaNieL..! wrote:
> I tryed the declare, before and after the BEGIN;, but allways returns
> me the error:
> -----------------------------------------------------------
> ERROR: syntax error at or near "int";
> LINE 1: DECLARE _mycredit int;
> ^
> -----------------------------------------------------------
>
> For the if statement, i've tryed that
> IF 2 = 2 THEN
> ROLLBACK;
> END IF
>
> but still the error near the "IF"..
> dunno.. in mysql the if can be used in that way.. in postgres no?
Sorry was thinking FUNCTION way of doing it. DECLARE can only be used
in a stored procedure/function.
Johan