毕业设计,初学jdbc mysql,在表中插入数据的sql语句是 "insert into order (userId,tableId) values(?,?)"
运行时,报了个错:
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 'order (userId,tableId) values(1,1)' at line 1
百度了一下才知道order好像是mysql中的关键字,不能作为表明或字段名,把"order"改为"ordertbl"成功运行,建议大家建数据库的时候注意一下。