Create trigger...what is this code for?

When I create a trigger, I see this code generated:

BEGIN
tmpVar := 0;

SELECT MySeq.NEXTVAL INTO tmpVar FROM dual;
:NEW.SequenceColumn := tmpVar;
:NEW.CreatedDate := SYSDATE;
:NEW.CreatedUser := USER;

I don’t see any use for this code…but don’t know if I can get rid of it. What is it there for?

John

It’s just sample code. Delete it if you don’t want it. You can set up your own template if you are interested. Look in Options -> Proc Templates.

That's just the default template. You can remove all of that generated code. To create your own template see View|Options|Proc Templates where you can modify the default ones.

Michael

On 07/12/2013 04:34 PM, warrenjo wrote:

Create trigger...what is this code for?

Thread created by warrenjo
When I create a trigger, I see this code generated:

BEGIN

tmpVar := 0;

SELECT MySeq.NEXTVAL INTO tmpVar FROM dual;

:NEW.SequenceColumn := tmpVar;

:NEW.CreatedDate := SYSDATE;

:NEW.CreatedUser := USER;

I don't see any use for this code...but don't know if I can get rid of it. What is it there for?

John

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.