An error occurs when inserting data in MySQL: [err] 1064 – you have an error in your SQL syntax; Check the manual that responses to your MySQL server version for the right syntax to use near ‘key, enkey, content) values (‘1’, ‘1’, ‘1’, ‘1’, ‘1’, Shijiazhuang ‘)’ at line 1
My SQL statement is: insert into doclist (title, entity, Zhiyao, enzhiyao, key, enkey, content) values (‘1 ‘,’ 1 ‘,’ 1 ‘,’ 1 ‘,’ 1 ‘,’ Shijiazhuang ‘). It seems that the SQL statement is correct, but it doesn’t run successfully. According to the error information, we can know that the error is near key, enkey and content,
The key is marked in blue, which represents the keyword. The common attribute conflicts with the keyword. The information on the Internet says to add any back quotation marks. If I want to change the name of the key directly, it’s fast and simple. Finally, change the key to keyw, and the operation data is inserted successfully.