Mybatis的update语句报ORA-00911的错误。。我在mapper.xml没加分号
语句如下。。。
<update id="updateTradingUnit" parameterType="CtpTradingUnitDataBean">
<![CDATA[
Update CTPTRADINGUNITTABLE Set
STATE={#state}
where UNITID = {#unitId}
]]>
</update>
原来有很多set,以为是哪个set写的有问题,特意删得只剩一个set,居然还报一样的错误。
确定末尾没有加分号。。
有没有大神帮忙看看,问题到底出在哪里。
异常信息:
org.springframework.jdbc.BadSqlGrammarException:
### Error updating database. Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
### The error may involve com.baoteng.qts.ctp.tradingunit.updateTradingUnit-Inline
### The error occurred while setting parameters
### SQL: Update CTPTRADINGUNITTABLE Set STATE={#state} where UNITID = {#unitId}
### Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符