Home > database >  Anyone know oracle primary key on the trigger how to write
Anyone know oracle primary key on the trigger how to write

Time:10-07

Lz sequences and table is no problem, according to the online writing how to trigger is to these errors, have a great god know what is going on,,,

CodePudding user response:

Bumps, have a great god know

CodePudding user response:

1, you can directly in the insert statement in sequence;
2, had better not use triggers, it may be a problem, especially the performance problems, if you use the trigger, can have a try:
The create or replace the trigger moni_tri before insert on mycrm for each row
The begin
If: the new id is null then
Select moni_squ. Nextval into: new id from dual;
end if;
end;

CodePudding user response:


It is an error

CodePudding user response:

You see if you are: the new id, this; and there is no space between the new, you are too open

CodePudding user response:

The
reference 3 floor "erratic response:

This is still an error


No problem,

CodePudding user response:


No Spaces, the correct statements directly

CodePudding user response:

refer to 6th floor "erratic response:

No Spaces, statements directly error
there is a you didn't change, if there is a: new. Id

CodePudding user response:

Is do not add a space, so much space to compile

CodePudding user response:

Ha ha, directly in the past, you have to knock myself,
  • Related