Re: limit number of rows using a trigger
Darren White Wrote:
-------------------------------------------------------
> Now I am back to initial problem:
>
> Error Code: 1442. Can't update table 'a_test' in
> stored function/trigger because it is already used
> by statement which invoked this stored
> function/trigger.
>
Read FAQ:
http://dev.mysql.com/doc/refman/5.5/en/faqs-triggers.html#qandaitem-B-5-1-9
Quote
B.5.9: Can triggers access tables?
A trigger can access both old and new data in its own table. A trigger can also affect other tables,
but it is not permitted to modify a table that is already being used (for reading or writing) by the statement that invoked the function or trigger.
The trigger cannot modify the table on which it has been fired.
Subject
Views
Written By
Posted
8547
March 13, 2012 03:50AM
2681
March 13, 2012 03:59AM
2094
March 13, 2012 04:09AM
2728
March 13, 2012 04:11AM
Re: limit number of rows using a trigger
2314
March 13, 2012 11:50AM
1697
March 14, 2012 05:32AM
2609
March 14, 2012 11:48AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.