insertintorder(orderId,orderTotal,customerId,orderContent)values(#{orderId},#{orderTotal},#{customerId}...
insert into rder(orderId,orderTotal,customerId,orderContent)values
(#{orderId},#{orderTotal},#{customerId},#{orderContent})
update storage set goodCount=#{goodCount} where goodCreateDate =
(select min(goodCreateDate) from storage where goodId=#{goodId}) and goodId=#{goodId}
delete form storage where goodCount=#{goodCount}
报错内容都差不多,如下
org.springframework.jdbc.BadSqlGrammarException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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(orderId,customerId,orderTotal,orderContent) values
('0101','202',200.0,'' at line 1
### The error may involve org.tedu.shopping.dao.OrderDao.newOrder1-Inline
### The error occurred while setting parameters
### SQL: insert into order(orderId,customerId,orderTotal,orderContent) values (?,?,?,?)
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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(orderId,customerId,orderTotal,orderContent) values
('0101','202',200.0,'' at line 1
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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(orderId,customerId,orderTotal,orderContent) values
('0101','202',200.0,'' at line 1
at
如果我的sql语句有误,求大神们给指点一二,给个争取的解决方案,谢谢!
展开