JDBC连接Oracle错误ORA-00922: 选项缺失或无效

以下错误:

ORA-00922: 选项缺失或无效

ORA-00922: missing or invalid option

由于

execute(sql)语句多了个分号

;

你没看错!!!

在sqlplus执行一点问题都没有的语句,JDBC总是报错:ORA-00922: 选项缺失或无效

百度了半天都没找到解决办法,最后还是谷歌给力,stackoverflow上的这个回答https://stackoverflow.com/questions/30818416/ora-00922-missing-or-invalid-option-when-trying-to-insert-into-table有效!

由于我之前是用JDBC连mysql,万万没想到sql语句加分号居然是错误?!

真是服了Oracle。

原文地址:https://www.cnblogs.com/wmjtxt/p/10064365.html