trigger: after insert into table1
I don't know a way to do it.
But one easy way would be to use a Stored Procedure and forget about the trigger.
In the Procedure, you would attempt the INSERT and, if you get an error from it, then do the other operation (e.g, put data into another table).
I think triggers are over-used and stored procedures are under-used, especially with MySQL.
|All times are GMT +1. The time now is 06:43 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.