When creating a function in navicat for mysql, a 1064 error occurs when saving, as shown below:
Basically there are two reasons Caused by:
1. It is caused by the parameter length of the stored procedure not being set. When we create the stored procedure in Navicat, we need to add the length of the parameter ourselves, otherwise this error will occur.
#Add the length of the parameter and then save it without going wrong.
Related recommendations: "Navicat for mysql graphic tutorial"
2. If there is no problem with the parameters, check your sql code, which is basically the syntax of the code caused by errors.
Sure enough, it is because the separator is not written.
MySQL uses ";" as the delimiter by default. If no delimiter is declared, the compiler will treat the stored procedure as an SQL statement, so the compilation process will report an error,
Therefore, you must use "DELIMITER //" to declare the current segment delimiter in advance, so that the compiler will treat the content between the two "//" as the code of the stored procedure and will not execute these codes;
"DELIMITER; " means to restore the separator.
The above is the detailed content of What should I do if a 1064 error occurs in navicat for mysql?. For more information, please follow other related articles on the PHP Chinese website!