阅读背景:

错误1064 (42000):SQL语法中有错误;我找不出我做错了什么

来源:互联网 
mysql> DESC transaction;
+-------+--------------+------+-----+---------+----------------+
| Field | Type         | Null | Key | Default | Extra          |
+-------+--------------+------+-----+---------+----------------+
| id    | int(11)      | NO   | PRI | NULL    | auto_increment |
| title | varchar(100) | NO   |     | NULL    |                |
| from  | int(11)      | NO   |     | NULL    |                |
| to    | int(11)      | NO   |     | NULL    |                |
| cost  | int(11)      | NO   |     | NULL    |                |
+-------+--------------+------+-----+---------+----------------+
5 rows in set (0.01 sec)

mysql> INSERT INTO transaction (title, from, to, cost) VALUES ('Ham', 1, 4, 9000);
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 'from, to, cost) VA
LUES ('Ham', 1, 4, 9000)' at line 1
mysql> DESC transaction;
+-------+-------------



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: