我在MySQL中收到错误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
以下是对表格的描述:
+-----------+---------+------+-----+---------+----------------+
| 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');
这是我得到的错误:
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很新,并且在我试图插入的数据行中多次查看。
答案 0 :(得分:1)
您忘记了关键字 VALUES
NSNotFound