i have searched for some posts related to executing multiple SQL statements with Mybatis. but that didnt work. i need to execute multiple DB2 statements in MyBatis . consider i have to run 3 DELETE statements
i have referred below link . in this post they have given example for Mybatis with ORACLE.
MyBatis executing multiple sql statements in one go, is that possible?
Query syntax :
<delete id="clearTable" parameterType="test">
DELETE FROM tableA WHERE key = #{key}
DELETE FROM tableb WHERE key = #{key} and param = #{param}
DELETE FROM tablec WHERE key = #{key} and param = #{param}
<delete>
error log :
Translating SQLException with SQL state '42601', error code '-199', message [[SQL0199] Keyword DELETE not expected. Valid tokens: OR USE SKIP WAIT WITH.]; SQL was [] for task [
Error updating database. Cause: java.sql.SQLException: [SQL0199] Keyword DELETE not expected. Valid tokens: OR USE SKIP WAIT WITH.
SQL: DELETE FROM tableA WHERE key = ? DELETE FROM tableb WHERE key = ? and param = ? DELETE FROM tablec WHERE key = ? and param = ?
Cause: java.sql.SQLException: [SQL0199] Keyword DELETE not expected. Valid tokens: OR USE SKIP WAIT WITH.
Thanks in Advance