Error wit trigger and delimiter
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
Subject
Views
Written By
Posted
Error wit trigger and delimiter
3248
April 25, 2006 08:16AM
1815
May 10, 2006 05:39AM
1925
May 10, 2006 09:50AM
1863
May 12, 2006 04:15AM
1767
May 12, 2006 08:43AM
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.