是否可以在batchUpdate
方法调用的插入中使用序列?我没有找到任何关于这个主题的内容。
jdbcTemplate.batchUpdate(
"INSERT INTO TUR1HV01.UR1_CP_GOR (id, GOR_NAME) values (select TUR1HV01.SEQ_CP_GOR_MODEL.nextval from dual, ?)",
gorList,
10000,
(ps, argument) -> {
ps.setString(1, argument.getGorName());
});
例外情况:Caused by: Error : 936, Position : 56, Sql = INSERT INTO TUR1HV01.UR1_CP_GOR (id, GOR_NAME) values (select TUR1HV01.SEQ_CP_GOR_MODEL.nextval from dual, :1 ), OriginalSql = INSERT INTO TUR1HV01.UR1_CP_GOR (id, GOR_NAME) values (select TUR1HV01.SEQ_CP_GOR_MODEL.nextval from dual, ?), Error Msg = ORA-00936: missing expression
我应该用扳机吗?
1条答案
按热度按时间hgc7kmma1#
应该行得通。