Home  >  Article  >  Database  >  What should I do if a 1064 error occurs in navicat for mysql?

What should I do if a 1064 error occurs in navicat for mysql?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-15 14:25:2829662browse

What should I do if a 1064 error occurs in navicat for mysql?

When creating a function in navicat for mysql, a 1064 error occurs when saving, as shown below:

What should I do if a 1064 error occurs in navicat for mysql?

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.

What should I do if a 1064 error occurs in navicat for mysql?

#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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn