0

MySQL error #1064

When issuing a command to MySQL, I'm getting error #1064 "syntax error".
What does it mean?
How can I fix it?

Azure-SQL Add a comment
michael
asked Mar 26 2021

Answer

0

That command yields the following error message:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id=101 SET name='foo'' at line 1t

Error #1064 means that MySQL can't understand your command.
To fix it:
Read the error message. It tells you exactly where in your command MySQL got confused

Examine your command. If you use a programming language to create your command, use echo, console.log(), or its equivalent to show the entire command so you can see it.

Check the manual. By comparing against what MySQL expected at that point, the problem is often obvious.

Check for reserved words. If the error occurred on an object identifier, check that it isn't a reserved word (and, if it is, ensure that it's properly quoted).

Add a comment
linuxhelp
asked Mar 26 2021
Post your Answer