Subject Re: Declare variables in trigger.
Author Adam
--- In, "Julio César Carrascal
Urquijo" <jcarrascal@...> wrote:
> Is it possible to declare variables inside a trigger? I need to insert
> some rows and relate those in another table.

It works if there are no syntax errors:

Switch the AS and DECLARE VARIABLE, and include a semicolon on the end
of the declare variable line.


create trigger BsCompanyPopulate for Company
active after insert position 0
declare variable AdminsGroupId as numeric(18,0);