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