Answer the question
In order to leave comments, you need to log in
How to use semicolons correctly when writing custom functions in MySQL?
Take, for example, this simple function:
CREATE FUNCTION MyFx(`MyArg` VARCHAR(255)) RETURNS VARCHAR(255)
DETERMINISTIC
BEGIN
RETURN (SELECT `val` FROM `table` WHERE `arg` = `MyArg`);
END
Answer the question
In order to leave comments, you need to log in
Is there a strict standard for procedural extensions of the SQL language? O___O And for a long time? I missed something...
Why do you want to use procedural SQL? This is the dark side of the Force, think twice - is it worth it?
Total:
In the procedure body, a delimiter is placed after each expression.
The rest of the declaration of the procedure is written according to BNF .
An example is here .
In order to use the separator in the body of the procedure, it is replaced when defining the procedure, how to do this is shown in the examples at the link.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question