MySQL Client Delimiters
On this page
Redefines the MySQL delimiter.
Syntax
DELIMITER delimiter_symbol
Remarks
When creating a function or a procedure using a MySQL-compatible client connected to SingleStore Helios, you must change the client delimiter to ensure that the function or procedure definition is correctly passed to the server as a single statement.
The DELIMITER
commands must be on independent lines.
SingleStore Notebooks does not support MySQL delimiter.
To change the MySQL delimiter, execute the following command before creating a new function or procedure:
DELIMITER //
When you’ve finished defining functions or procedures, make sure to change the MySQL delimiter back to a semicolon:
DELIMITER ;
Example
The function below uses the delimiter //
, which can be executed directly in a MySQL-compatible client connected to SingleStore Helios:
DELIMITER //CREATE FUNCTION plus_one(a INT) RETURNS INT ASDECLAREb INT = a;BEGINb += 1;RETURN b;END //DELIMITER ;
All SingleStore Helios Procedural SQL (PSQL) topics include this MySQL delimiter consideration.
Last modified: August 29, 2024