使用:插入數據庫
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