Home > database >  The trigger problems
The trigger problems

Time:09-16

M insert A data table A, B, C, there is A trigger on A, A, the data will put the ABC three part of data is inserted into the new table D, the question is: B table didn't finish inserts, the trigger to get data, has led to the loss of D the data in the table, the problem how to solve

CodePudding user response:

1, adjust the insert the order of ABC three tables,
2, in the last table, the trigger wrote

The above two methods, you can refer to it

CodePudding user response:

Can put on A table to insert data in the final, and judgment on A table: table B M, have to put the insert a. M

CodePudding user response:

Yes, it is this meaning,

CodePudding user response:

Can consider the Oracle's autonomous transactions, even if the failure of the part will not lead to the entire transaction rollback,
Reference: https://blog.csdn.net/fenglibing/article/details/4059924
  • Related