MySQL Forums
Forum List  »  Triggers

Error 1064 (42000) when creating trigger
Posted by: Stephanie Worden
Date: November 16, 2011 10:09AM

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.

Options: ReplyQuote


Subject
Views
Written By
Posted
Error 1064 (42000) when creating trigger
3720
November 16, 2011 10:09AM


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.