I keep getting this error.
How do I solve this problem?
我一直得到这个错误。我如何解决这个问题?
Error:
错误:
java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
java.sql。SQLSyntaxErrorException: ORA-00933: SQL命令未正确结束
Code:
代码:
<update id="updateProc" parameterClass="rating">
update rating set
rating_title=#rating_title#
rating_cont=#rating_cont#
where mem_id=#mem_id#
and rating_code=#rating_code#
</update>
3 个解决方案
#1
4
Please put ,
between your columns of Set
Clause like:
请在Set子句的列之间加上:
update rating set rating_title=#rating_title#, rating_cont=#rating_cont#
where mem_id=#mem_id# and rating_code=#rating_code#
#2
3
In Oracle, string literals are denoted by single quotes ('
). So, if you plan to use literals:
在Oracle中,字符串文字用单引号(')表示。所以,如果你打算使用文字
UPDATE rating
SET rating_title='rating_title', rating_cont='rating_cont'
WHERE mem_id='mem_id' AND rating_code='rating_code'
#3
0
You can also get this exact same error if you have quotes that are not properly closed or you forget to use double quotes inside of a statement with single quotes on the outside.
你也可以得到同样的错误如果你引用了没有正确关闭的引号或者你忘记了在语句的内部使用双引号在外面的单引号。
#1
4
Please put ,
between your columns of Set
Clause like:
请在Set子句的列之间加上:
update rating set rating_title=#rating_title#, rating_cont=#rating_cont#
where mem_id=#mem_id# and rating_code=#rating_code#
#2
3
In Oracle, string literals are denoted by single quotes ('
). So, if you plan to use literals:
在Oracle中,字符串文字用单引号(')表示。所以,如果你打算使用文字
UPDATE rating
SET rating_title='rating_title', rating_cont='rating_cont'
WHERE mem_id='mem_id' AND rating_code='rating_code'
#3
0
You can also get this exact same error if you have quotes that are not properly closed or you forget to use double quotes inside of a statement with single quotes on the outside.
你也可以得到同样的错误如果你引用了没有正确关闭的引号或者你忘记了在语句的内部使用双引号在外面的单引号。