我写了Sql
<insert id="insertBag" parameterType="bag">
insert
into bag(p_num, p_name, p_info, p_amount, p_price, b_buy)
values (${p_num}, ${p_name}, ${p_info}, ${p_amount}, ${p_price},${b_buy})
</insert>
控制台问题
insert into bag(p_num, p_name, p_info, p_amount, p_price, b_buy)
values (5, Green Chef, Narrowly taking the lead for first place is Hello Fresh! Like nearly all , 3, 9000,10)
原因:java.sql.SQLSyntaxErrorException:ORA-00917:缺少逗号
答案 0 :(得分:0)
当它用Green Chef替换$ {p_name}时,该字符串应该在单引号内,对吗?