Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Tags
more
Archives
Today
Total
관리 메뉴

devNyong

[ORACLE] java.sql.SQLSyntaxErrorException: ORA-00905 본문

error

[ORACLE] java.sql.SQLSyntaxErrorException: ORA-00905

devNyong 2022. 10. 4. 17:47

I am trying to insert data into an existing table and keep receiving an error. 

This happens because my typo 

 

my error code  

 <insert id="insert">
        <foreach collection="arr" item="item" open="INSERT ALL" close="SELECT * FROM DUAL" separator=" ">
             INSERT INTO TEST_TABLE(
                 ID
                , ITEM_VALUE              
            ) VALUES (
                 #{item.id}
                , #{item.value}
            )
        </foreach>
    </insert>

 

solution   :  REMOVING THE INSERT 

 <insert id="insert">
        <foreach collection="arr" item="item" open="INSERT ALL" close="SELECT * FROM DUAL" separator=" ">
            INTO TEST_TABLE(
                 ID
                , ITEM_VALUE              
            ) VALUES (
                 #{item.id}
                , #{item.value}
            )
        </foreach>
    </insert>
Comments