Haim Evgi
Haim Evgi

Reputation: 125496

How can I write a trigger in mysql that after an insert to the table deletes the row?

I've got an after insert trigger that works well.

However, I want it to delete the row after it's been inserted and after the main body of the trigger completes.

How can I do that?

I have a unique id in the table.

Upvotes: 1

Views: 1463

Answers (1)

longneck
longneck

Reputation: 12226

This isn't possible. You can't modify the target table with an AFTER trigger.

Upvotes: 1

Related Questions