使用:插入数据库
Dao.xml
<insert id="someId" parameterType="someBean" >
INSERT ALL
<foreach collection="list" item="item" index="index" >
INTO table_name
(ID,NAME)
VALUES
(#{item.id},#{item.name})
</foreach>
SELECT * FROM DUAL
</insert>
Dao.java
void someId(List<SomeBean> list);
列表大小通过为:350
不过,虽然执行了引发错误:
org.springframework.jdbc.UncategorizedSQLException:
Error updating database. Cause: java.sql.SQLException: ORA-24335: cannot support more than 1000 columns
这里使用的数据库是oracle。
你的目标表*真的*只有两列吗? – APC 2013-04-23 16:33:27
@APC它有20列。 – abc 2013-04-24 10:56:57