MySQL Forums
Forum List  »  Source, Builds, Binaries

Re: trigger that prevent insertion
Posted by: Claudia Claudia
Date: February 10, 2010 08:08AM

If I do

delimiter //

CREATE TRIGGER TR_chk_statoPartita after INSERT ON Partita
FOR EACH ROW BEGIN
DELETE FROM Partita WHERE NEW.stato > 2;
END;
//

when I try to insert value to Partita I get the error message:

ERROR 1442 (HY000): Can't update table 'partita' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.

Please help me!! :(

Options: ReplyQuote


Subject
Views
Written By
Posted
4661
February 10, 2010 08:04AM
Re: trigger that prevent insertion
2418
February 10, 2010 08:08AM
2348
February 10, 2010 08:26AM


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.