Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: declare variable in trigger

Re: declare variable in trigger

From: William Robertson <williamr2019_at_googlemail.com>
Date: 23 Dec 2006 16:48:15 -0800
Message-ID: <1166921294.951522.160070@42g2000cwt.googlegroups.com>


On Dec 23, 7:13 am, harun.bo..._at_netsim.net wrote:
> [snip]
> using variable same as field name makes code more readable.

Never heard that one before. I've always used a 1-character prefix, seems more readable to me.

> [snip]
> 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?

I suppose triggers are different in that the PL/SQL starts at the first DECLARE or BEGIN (you could in theory write them in Java). I'm guessing that has some effect on the scoping mechanism. But in the end it works the way it works, and I'm afraid it's just tough if you were hoping it would work differently. Received on Sat Dec 23 2006 - 18:48:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US