Execution Result:
Inquire:Create procedureTest1 (outvar varchar( $)) Comment'Action Variables' begin Set var='MYSQL%ORCLE%DELL%IBM';Select Replace(var,'%'... Total0The execution time of the row affected:0sec Delivery Time:0.064sec Total Time:0.065sec--------------------------------------------------query: delimiter; error code:1064You have an errorinchyour SQL syntax;CheckThe manual that corresponds toYour MySQL server version forThe RightSyntax to UseNear'delimiter'At line1
The SQL statement is:
DELIMITER//CREATE PROCEDURETest1 (outvar VARCHAR( $)) COMMENT'Action Variables'BEGIN SET var='MYSQL%ORCLE%DELL%IBM'; SELECT REPLACE(var,'%','|') into var;END//DELIMITER;
Workaround:
The solution is simple, but it is not understood. Is behind the delimiter, '; ' Before the semicolon, add a space ! This is a completely unknown solution.
About an error encountered in MySQL stored procedure