When a trigger is used to create a sequence of tables and directly paste data into the table, the sequence fields are automatically generated and viewed in the following ways: 1. Trigger user name. table name_trg, view can see the code of the corresponding trigger 2. view the corresponding table to see the final trigger segment, you can see the enable trigger implementation code createorreplacetriggercux. c
When a trigger is used to create a sequence of tables and directly paste data into the table, the sequence fields are automatically generated and viewed in the following ways: 1. Trigger user name. table name_trg, view can see the code of the corresponding trigger 2. view the corresponding table to see the final trigger segment, you can see the enable trigger implementation code create or replace trigger cux. c
Sequence sequence create table sequence trigger
FunctionWhen you paste data directly to the table, the sequence fields are automatically generated.
View MethodGenerally: 1. trigger username. Table name_trg. view will be able to see the code of the corresponding trigger. 2. view the final trigger segment through the corresponding table of view to see the trigger of enable.
Implementation Code
Create or replace trigger cux. cux_rebate_line_trg before insert on cux. cux_rebate_line for each rowdeclare l_id number; begin select cux_rebate_line_s.nextval into: new. line_id from dual; exception when others then raise_application_error (-20100, 'Get _ sequence_nextval error' | sqlerrm); end;
Description1. The created trigger must be created under the user of the corresponding table. 2. It is recommended that the name of the table + _ TRG3 and into be: new. columns that need to automatically generate the sequence