1442 - Can't update table
I've got this trigger:
CREATE DEFINER = `root`@`localhost` TRIGGER `ograniczenie` BEFORE INSERT ON `wyjscia`
FOR EACH ROW
BEGIN
SELECT COUNT( * ) INTO @cnt FROM wyjscia;
IF @cnt >=5 THEN
DELETE FROM wyjscia WHERE id = ((SELECT MIN(id) FROM wyjscia)) LIMIT 1 ;
END IF ;
END
Error: #1442 - Can't update table 'wyjscia' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
Is there any solution of this problem? :(
Subject
Views
Written By
Posted
1442 - Can't update table
4496
November 30, 2012 08:51AM
2071
December 01, 2012 04:09PM
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.