Friday, December 2, 2011

Re: MySQL DELIMITER statement not working in Squirrel

Rob: DELIMITER is a proper SQL command that you use to change the char to be used as a delimiter. Since ';' is the default delimiter, one typically changes it to something else i.e. '//' to have the freedom to use ';' in multiline procedures as single-line delimiter (as opposed to // to be used as a procedure delimiter). So it should be understood and properly passed by every mysql client.

Philip: I think you have a syntax error in your example. If you try something classic like this, it should definitely work:

DELIMITER //
CREATE PROCEDURE test_delimiter()
BEGIN
  SELECT * FROM MY_TABLE;
END//
DELIMITER ;

I confess I did try this only in the google_sql tool, but there's no reason why Squirrel should not accept it, since the MySql engine does.

No comments:

Post a Comment