我有一个这样的交易过程:
INSERT INTO transaction(out, taxi_no, driver_name, odometer, date, mileage_out, hours_rent, remittance, total, shortage) VALUES (@out, @taxiNO, @drivername, @odometer, @date, @mout, @hours, @remittance, @total, @shortage)
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 'out, taxi_no, driver_name, odometer, date, mileage_out, hours_rent, remittance, ' at line 1
我只是复制了语法并更改了我其他项目的值,它在我的其他项目上运行良好,但是当我尝试运行该应用程序时,它给了我错误。
最佳答案
out
是 mysql 中的关键字,所以请添加 backtick
ie `back quote`
关于mysql - 插入失败 : Error in MySql syntax in VB. 网络,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42625309/