我寫了一個簡單的觸發器,但它引發了我沒有得到的錯誤。我的繼承人觸發:無法使MySQL觸發器正常工作
CREATE TRIGGER logSlette After DELETE on ansatte
for each row
begin
insert into slettede_ansatte set AnsattID=old.AnsattID,slettet=now()
end;
該表是CREATE TABLE語句:
CREATE TABLE slettede_Ansatte
(
AnsattID Integer(4) NOT NULL,
slettet TIME NOT NULL,
CONSTRAINT Ansatte_PK Primary Key(AnsattID)
) ENGINE=INNODB;
它給出了什麼錯誤? – David 2010-12-14 19:25:33
它說「附近的SQL語法錯誤結束」;「 – 2010-12-14 19:36:10