Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: declare variable in trigger
harun.bolat_at_netsim.net a écrit :
> we use firebird database and try to migrate project to oracle. All our
> database object( trigger, stored procedure) we use variable name same
> as database field name and we have no problem. using variable same as
> field name, makes code more readable.
> to migrate oracle from firebird we try to write convert program that
> takes firebird sql and produce oracle sql code.
>
> In oracle stored procedure we can use variable name same as field name
> like procedure_name.variable_name syntax. This syntax why not exists it
> trigger?
Perhaps block labels will help you - something like this little crazie :
CREATE OR REPLACE TRIGGER KULLANIC_BI BEFORE INSERT ON KULLANIC
FOR EACH ROW
BEGIN
<<KULLANIC_BI>>
DECLARE
NSUID INTEGER;
BEGIN
NSUID := 5;
SELECT MAX(K.NSUID) AS F_1
INTO NSUID FROM KULLANIC K