关于mybatis的 insert into select 命令未结束问题
2017-07-04 21:39
1316 查看
关于mybatis的 insert into select 命令未结束问题,最后以为是sql写错了,可是,在plsql运行又没问题。最后还是解决这个问题。
是设置问题。
### Cause: java.sql.SQLSyntaxErrorException: ORA-00933: SQL 命令未正确结束
原先的配置:
<insert id="addHistoryByPostBatchno" parameterType="paramMap" >
改动了以后,加了
useGeneratedKeys="false"
<insert id="addHistoryByPostBatchno" parameterType="paramMap" useGeneratedKeys="false" > Insert into Tb_Dispatch_Mail_History ( mail_no, rec_name, rec_address, rec_telephone, customer_no, post_opter, mail_content_name, mail_weight, actual_postage, delivery_area, post_time, post_condition, post_status, post_batchNo, customer_id ) select mail_no, rec_name, rec_address, rec_telephone, customer_no, post_opter, mail_content_name, mail_weight, actual_postage, delivery_area, post_time, post_condition, post_status, post_batchNo, customer_id from Tb_Dispatch_Mail_Post tp <where> tp.post_batchno=#{paramMap.postBatchno} </where> </insert>问题顺利解决,不在报错。假设你也遇到相同问题,请留言一起探讨,我也仅仅是攻克了问题而已。假设看到这里你攻克了问题。麻烦点赞吧!
官网的解释是
同意 JDBC 支持自己主动生成主键,须要驱动兼容。假设设置为 true 则这个设置强制使用自己主动生成主键,虽然一些驱动不能兼容但仍可正常工作(比方 Derby)。
相关文章推荐
- 关于mybatis的insertintoselect命令未结束问题
- 关于mybatis的 insert into select 命令未结束问题
- mybatis中insert into ...select ...from dual union all select ... from dual 提示sql命令未结束的问题
- mybatis oracle insert into select 命令未正确结束
- ORA-00933 SQL命令未正确结束 INSERT INTO ... SELECT
- tokudb关于insert into ...select..锁的问题
- mybatis中 insert into select 批量生成uuid时 用replace去掉"-"
- 关于java myBatis selectList 问题
- 关于操作Access数据报System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误异常问题
- 关于MySQL insert into ... select 的锁情况
- 利用触发器和INSERT INTO ...SELECT...解决Oracle 数据匹配问题
- insert into...select from...ORA-02287: sequence number not allowed here问题
- 如何优化用SQL语句INSERT INTO … SELECT插入数据时锁全表的问题
- mybatis中 insert into select 批量生成uuid时 用replace去掉"-"只生成一个uuid
- 关于mybatis(insert插入)返回主键的问题
- MySql自动类型转换 MySql insert into select 带来的问题
- 关于Access Insert Into 语句的时间插入问题?
- 关于insert into table 的数据排序问题
- mysql 中关于select into outfile 提示权限不足的问题
- mybatis插入oracle数据库,如果用foreash就用select xx from dual;否则用insert into tablename(,,)values()时不要用foreach