MySQL - 语法错误 1064 负双打和字符
MySQL - Error in Syntax 1064 with Negative Doubles and Chars
我在 MySQL 尝试将新数据插入数据 table 时遇到错误 1064。我已经查找了错误,但找不到任何解决该问题的 Stack Overflow 问题。
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
这里是table的描述:
+-----------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| coord1lat | double | NO | | NULL | |
| coord1lon | double | NO | | NULL | |
| coord3lat | double | NO | | NULL | |
| coord3lon | double | NO | | NULL | |
| status | char(1) | NO | | NULL | |
+-----------+---------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
这是我要插入的示例行:
insert into sample_parking_spots (null, 47.60624, -122.299735, 47.60226, -122.299687, 'T');
这是我在 return:
中遇到的错误
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 'null, 47.60624, -122.299735, 47.60226, -122.299687, 'T')' at line 1
如果这确实是一个问题的重复,我深表歉意,但我是 MySQL 的新手,并且多次查看我试图插入的数据行。
您忘记了关键字 VALUES
insert into sample_parking_spots VALUES (null, 47.60624, -122.299735, 47.60226, -122.299687, 'T');
我在 MySQL 尝试将新数据插入数据 table 时遇到错误 1064。我已经查找了错误,但找不到任何解决该问题的 Stack Overflow 问题。
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
这里是table的描述:
+-----------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+---------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| coord1lat | double | NO | | NULL | |
| coord1lon | double | NO | | NULL | |
| coord3lat | double | NO | | NULL | |
| coord3lon | double | NO | | NULL | |
| status | char(1) | NO | | NULL | |
+-----------+---------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
这是我要插入的示例行:
insert into sample_parking_spots (null, 47.60624, -122.299735, 47.60226, -122.299687, 'T');
这是我在 return:
中遇到的错误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 'null, 47.60624, -122.299735, 47.60226, -122.299687, 'T')' at line 1
如果这确实是一个问题的重复,我深表歉意,但我是 MySQL 的新手,并且多次查看我试图插入的数据行。
您忘记了关键字 VALUES
insert into sample_parking_spots VALUES (null, 47.60624, -122.299735, 47.60226, -122.299687, 'T');