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

前端 未结 10 655
悲&欢浪女
悲&欢浪女 2021-02-01 04:28

While I am trying to insert a row to my table, I\'m getting the following errors:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that         


        
10条回答
  •  一个人的身影
    2021-02-01 05:07

    I encountered this same error: 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 ', completed)' at line 1

    This was the input I had entered on terminal: mysql> create table todos (description, completed);

    Solution: For each column type you must specify the type of content they will contain. This could either be text, integer, variable, boolean there are many different types of data.

    mysql> create table todos (description text, completed boolean);

    Query OK, 0 rows affected (0.02 sec)

    It now passed successfully.

提交回复
热议问题