MyBatis
insert into select sql 명령어가 올바르게 종료되지 않았습니다
xemaker
2019. 3. 4. 16:25
마이바티스 이용시 insert into select를 하면
"; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00933: SQL 명령어가 올바르게 종료되지 않았습니다
"
00933에러를 보게된다.
<insert id="testSql" parameterType="map">
INSERT INTO table_name
(test)
(select test from test)
</insert>
<update id="testSql" parameterType="map">
INSERT INTO table_name
(test)
(select test from test)
</update>
insert를 update로 바꿔 주면 된다.
출처: https://blog.fast87.com/132 [하늘과 바람과 별과 코드]
"; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00933: SQL 명령어가 올바르게 종료되지 않았습니다
"
00933에러를 보게된다.
<insert id="testSql" parameterType="map">
INSERT INTO table_name
(test)
(select test from test)
</insert>
<update id="testSql" parameterType="map">
INSERT INTO table_name
(test)
(select test from test)
</update>
insert를 update로 바꿔 주면 된다.
출처: https://blog.fast87.com/132 [하늘과 바람과 별과 코드]