MySQL delimiter syntax error

I am trying to change the MySQL command separator, so I can create a procedure with several commands. However, the delimiter command does not seem to be recognized in MySQL 5.1.47. I tested it on MySQL 5.0.91 and it worked there.

DELIMITER //;
DELIMITER ;//

I am trying to run this from phpmyadmin in both situations. Using 5.0.91 instead is not an option, because I need to use events ( CREATE EVENT).

Error message:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER //' at line 1 

Is there a reason why it does not work, or is there an alternative to achieve the same thing (creating a procedure with multiple requests)?

+5
source share
2 answers

DELIMITER MySQL. , MySQL. PHPMyAdmin 2.8.2.4, . , 3.4.9, . MySQL DELIMITER .

+13

DELIMIT

DELIMITER //

procedure here etc

DELIMITER ;

" " MySQL.

, - 5.5.20. ?

Edit:

... ,

; /* <- force previous statement termination */ DELIMITER //

procedure here etc

DELIMITER ;
+2

All Articles