Error 1064 (42000) when creating trigger
I am working from a book not MySQL specific, but MySQL 5.5 seems to support triggers fairly well so I'm not sure why the code isn't working. I cannot see any reserved words being used.
CREATE TRIGGER INSERT_LOG
AFTER INSERT ON ARTISTS
REFERENCING NEW ROW AS New
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO ARTIST_LOG (ACTION_TYPE, ARTIST_ID)
VALUES ('INSERT', New.ARTIST_ID);
END;
The error 1064 (42000) message says the error is occurring near "REFERENCING NEW ROW AS New" line, but I don't see why.
Subject
Views
Written By
Posted
Error 1064 (42000) when creating trigger
4049
November 16, 2011 10:09AM
1588
November 16, 2011 10:26AM
1498
November 16, 2011 11:10AM
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.