Problem Description:
Using POWERDESIGNER15 to create a physical data model for Oracle 11g, you want to implement a field that is self-increasing using the following steps:
1, create a sequence, named Sequence_1;
2, in the Self-increment field edit window, select sequence sequence_01;
3, the Table Window preview tab, generate code copied to Sqldeveloper 11gr2 execution, compilation error:
Powerdeginer generated part of the code:
-------------------------------------------------------------------
Create or Replace Trigger Compoundupdatetrigger_user1
For update on USER1 compound trigger
Declaration
Body
Before statement is
Begin
NULL;
End Before statement;
Before each row is
Begin
NULL;
End before each row;
After all row is
Begin
NULL;
End after each row;
After statement is
Begin
NULL;
End after statement;
END
/
-------------------------------------------------------------------
Trigger compilation errors are as follows
Error: PLS-00103: the symbol "End-of-file" appears when the following is required:; <an identifier> <a double-quoted delimited-identifier> symbol ";" is replaced with "End-of-file" after continuing.
Problem solving;
1, the generated code in//modified into--
2. Add a semicolon after end (;)
As follows:
-------------------------------------------------------------------
Create or Replace Trigger Compoundupdatetrigger_user1
For update on USER1 compound trigger
--declaration
-Body
Before statement is
Begin
NULL;
End Before statement;
Before each row is
Begin
NULL;
End before each row;
After all row is
Begin
NULL;
End after each row;
After statement is
Begin
NULL;
End after statement;
END;
/
-------------------------------------------------------------------
Compile success prompt:
Compounddeletetrigger_user1 has been compiled
Summarize:
In Sqldeveloper, when you create a trigger, you add a semicolon at the end (;) and slash (/)
1, semicolon (;) is the end of the statement block identification;
2, the slash (/) is the statement block execution of the identity;
Powerdesginer generated Oracle 11g combined trigger code compilation error: PLS-00103