Important
The SingleStore 9.1 release candidate (RC) is available now. It will be promoted to general availability (GA) soon and at that time it will be renamed to SingleStore 10.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10, while SingleStore 9.0 is recommended for production workloads.
MySQL Client Delimiters
On this page
Redefines the MySQL delimiter.
Syntax
DELIMITER delimiter_symbolRemarks
When creating a function or a procedure using a MySQL-compatible client connected to SingleStore, 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.
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:
DELIMITER //CREATE FUNCTION plus_one(a INT) RETURNS INT ASDECLAREb INT = a;BEGINb += 1;RETURN b;END //DELIMITER ;
All SingleStore Procedural SQL (PSQL) topics include this MySQL delimiter consideration.
Last modified: