Reputation: 3308
MYSQL:
I have a table with a AFTER INSERT ON trigger on it.
I have inserted a million rows in the table and the trigger code successfully gets executed and updates 10 other tables.
Now, I have deleted the data from the 10 children tables but the million rows in the parent table is retained.
Can I manually simulate that trigger code for those million records in the parent table to reinsert them in the 10 children tables...???
Upvotes: 0
Views: 2786
Reputation: 1
You can use the "AFTER INSERT" trigger like an "AFTER UPDATE", then you can make a safe update where you don't harm anything, this way you can re insert the rows.
Don't forget to delete "AFTER UPDATE", and restore de respective "AFTER INSERT".
Upvotes: 0
Reputation: 62395
No you can't. Only actual, successful INSERT
s trigger before/after insert triggers.
Upvotes: 1