MySQL Forums
Forum List  »  Triggers

Error wit trigger and delimiter
Posted by: Andrea Asamoah
Date: April 25, 2006 08:16AM

delimiter ";;"

CREATE TRIGGER before_insert_shelf BEFORE INSERT ON SHELF
FOR EACH ROW BEGIN
IF new.capacity > 10 THEN
set new.capacity = 10;
END IF;
END;;

delimiter ";"

I enetered this code in a script file using my own local copy of mysql, which executed alright but as soon as I tried it with server -linuxproj on mysql - it threw an error after the line
set new.capacity = 10;
It didnt let me finish entering all the code.

However with linuxproj I didnt execute the whole script file, I entered the commands manually one by one as I am unsure how to execute a script file that you can store on a sql server that is not local to you.

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Error wit trigger and delimiter
3248
April 25, 2006 08:16AM


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.