ORA-00911:执行查询时出现无效字符错误

时间:2016-03-24 11:05:53

标签: java sql oracle jdbc

(1,2) since they both are in studie 1 and on run 1, (3,4) since they both are in studie 1 and on run 2, (5,6) since they both are in studie 2 and on run 1, (1,2,3,4) since they are in studie 1 (5,6) since they are in studie 2 (1,2,3,4,5,6) since they are in column 1.

对于上面的查询,我收到oracle错误ORA-00911:从java类文件执行查询时出现无效字符错误。它的修正是什么?

1 个答案:

答案 0 :(得分:1)

SQL语句不包含尾随分号。它在SQL * Plus和其他客户端中用作语句分隔符(即使在那里你可以将其更改为不同的字符),它也不是语句本身的一部分。 (PL / SQL需要分号作为分隔符,但这不是主题)。

当您通过JDBC运行语句时,不应包含分号。你应该正在运行

"\\.\"

(拆分只是为了显示它没有横向滚动......)