error 1422 when create trigger
Posted by:
tra huu
Date: December 09, 2011 12:10PM
DELIMITER $$
drop trigger if exists abc $$
create trigger acb AFTER INSERT on sach FOR EACH ROW
begin
set @ma = (select madanhmuc from inserted) ;
set @tam = (select count(*) from sach s where s.madanhmuc = ma);
if tam > 1 then
rollback ;
end if;
end $$
when execute export error: Error Code: 1422. Explicit or implicit commit is not allowed in stored function or trigger.
Subject
Views
Written By
Posted
error 1422 when create trigger
8635
December 09, 2011 12:10PM
2596
December 09, 2011 03:46PM
2298
December 10, 2011 06:18AM
2174
December 10, 2011 10:14AM
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.