MySQL 1064: You have an error in your SQL syntax

无人久伴 提交于 2019-12-11 11:06:44

问题


I need some help in this SQL Code. I am new to SQL and using the Sams Teach Yourself SQL.

   INSERT INTO `eli`.`checks`
(`check`,
`payee`,
`amount`,
`remarks`)
VALUES
(500,'John Dree',450.00,'Bills');
INSERT INTO `eli`.`checks`
(`check`,
`payee`,
`amount`,
`remarks`)
VALUES
(575,'Ma Belle',150.00,'Gas Bills');
INSERT INTO `eli`.`checks`
(`check`,
`payee`,
`amount`,
`remarks`)
VALUES
(600,'Jon Cash',350.00,'Shopping');

I am getting error 1064: . 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 'payee, amount, reINSERT INTO eli`.checks' at line 1

Thank you :)

回答1:


Try this?

INSERT INTO `eli`.`checks` (`check`, `payee`, `amount`, `remarks`) VALUES
(500, 'John Dree', 450.00, 'Bills'),
(575, 'Ma Belle', 150.00, 'Gas Bills'),
(600, 'Jon Cash', 350.00, 'Shopping');


来源:https://stackoverflow.com/questions/25898487/mysql-1064-you-have-an-error-in-your-sql-syntax

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!