Sample Header Ad - 728x90

How can you check if DB/2 trigger fired due to table insert/update that is part of multi-table transaction?

0 votes
0 answers
64 views
I have scenarios where Table A and Table B can be updated as part of a single transaction or Table B can be updated on its own. I have a trigger on Table A for when there is an update on Table A and Table B as part of a single transaction. I have a trigger on Table B for when only Table B is updated. However, if Table A and Table B are updated and the Table A trigger fires the Table B trigger will also fire given Table B was updated. I'd like to avoid the double trigger fire. Is there a way I can check within the Table B trigger to check if it was fired as a result of the update NOT being part of a transaction?
Asked by Cocoanut (101 rep)
Apr 19, 2023, 10:49 AM
Last activity: Apr 20, 2023, 10:41 AM