본문 바로가기
[DataBase]/Oracle

마이바티스 이용시 insert into select

by control+c 2017. 5. 21.
반응형


마이바티스 이용시 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로 바꿔 주면 된다. 



by. 조조나리

반응형

댓글