SQLSyntaxErrorException when using LIKE with ojdbc7.jar

吃可爱长大的小学妹 提交于 2019-11-28 12:31:38

An Oracle Bug addresses the issue where the LIKE operator causes a problem in the parser:
Bug 18590786

This bug was also referenced in a similar Oracle Bug:
Bug 18644587 : ORACLEPARAMETERMETADATAPARSER GENERATES BAD STATEMENT FOR A UNION

It is not clear whether the fix is generally available yet.

Maybe a little too late, but a workaround to this is to qualify the field before the LIKE with double quotes like below:

SELECT * FROM natperson WHERE "NAME" LIKE ?
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!