The following articles mainly describe the actual insert operations for views created from multiple Oracle tables. We all know that views created from a single table are actually operated, you can add, delete, and modify it. Views created from multiple Oracle databases cannot be directly added to views or updated.
Solution: Replace the trigger. Everyone may know how to do this.
Create or replace trigger name
- Instead Of Insert or update or delete
On View
- for each row
- Declare
- begin
- If Inserting Then
Insert Into basic table 1 (t11, t12) Values (: New. f1,: New. f2 );
Insert Into basic table 2 (t11, t22) Values (: New. f1,: New. f3 );
- elsif Updating Then
Update basic table 1 set t11 =: New. f1, t12 =: New. f2 where t11 =: New. f1;
Update basic table 2 set t11 =: New. f1, t22 =: New. f3 where t11 =: New. f1;
- elsif Deleting then
Delete from basic table 1 where t11 =: Old. f1;
Delete from basic table 2 where t11 =: Old. f1;
The above content is the description of the insert View created in Oracle multi-Table mode. We hope it will help you in this regard.