• <tfoot id='EB8wB'></tfoot>

    <small id='EB8wB'></small><noframes id='EB8wB'>

    1. <i id='EB8wB'><tr id='EB8wB'><dt id='EB8wB'><q id='EB8wB'><span id='EB8wB'><b id='EB8wB'><form id='EB8wB'><ins id='EB8wB'></ins><ul id='EB8wB'></ul><sub id='EB8wB'></sub></form><legend id='EB8wB'></legend><bdo id='EB8wB'><pre id='EB8wB'><center id='EB8wB'></center></pre></bdo></b><th id='EB8wB'></th></span></q></dt></tr></i><div id='EB8wB'><tfoot id='EB8wB'></tfoot><dl id='EB8wB'><fieldset id='EB8wB'></fieldset></dl></div>

      <legend id='EB8wB'><style id='EB8wB'><dir id='EB8wB'><q id='EB8wB'></q></dir></style></legend>

          <bdo id='EB8wB'></bdo><ul id='EB8wB'></ul>
      1. SQL 错误:ORA-00933:SQL 命令未正确结束

        时间:2023-09-18

        1. <legend id='X4iG7'><style id='X4iG7'><dir id='X4iG7'><q id='X4iG7'></q></dir></style></legend>
        2. <i id='X4iG7'><tr id='X4iG7'><dt id='X4iG7'><q id='X4iG7'><span id='X4iG7'><b id='X4iG7'><form id='X4iG7'><ins id='X4iG7'></ins><ul id='X4iG7'></ul><sub id='X4iG7'></sub></form><legend id='X4iG7'></legend><bdo id='X4iG7'><pre id='X4iG7'><center id='X4iG7'></center></pre></bdo></b><th id='X4iG7'></th></span></q></dt></tr></i><div id='X4iG7'><tfoot id='X4iG7'></tfoot><dl id='X4iG7'><fieldset id='X4iG7'></fieldset></dl></div>

          <small id='X4iG7'></small><noframes id='X4iG7'>

          • <bdo id='X4iG7'></bdo><ul id='X4iG7'></ul>

              • <tfoot id='X4iG7'></tfoot>

                    <tbody id='X4iG7'></tbody>
                  本文介绍了SQL 错误:ORA-00933:SQL 命令未正确结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用联接更新 oracle SQL 开发人员中的记录.以下是我的查询-

                  I am trying to update a record in oracle SQL developer by using Joins. Following is my query-

                  UPDATE system_info set field_value = 'NewValue' 
                  FROM system_users users 
                  JOIN system_info info ON users.role_type = info.field_desc 
                  where users.user_name = 'uname'
                  

                  但是,当我尝试执行它时,出现以下错误-

                  However, when I tried to execute it, I got following error-

                  Error report: SQL Error: ORA-00933: SQL command not properly ended 
                                00933. 00000 - "SQL command not properly ended"
                  

                  我尝试删除 JOINS

                  I tried removing JOINS

                  UPDATE system_info info 
                  SET info.field_value = 'NewValue' 
                  FROM system_users users 
                  where users.user_name = 'uname' AND users.role_type = info.field_desc
                  

                  但仍然有同样的错误谁能告诉我错误原因和解决方法

                  but still having same error can anybody tell me the error reason and solution

                  推荐答案

                  Oracle 不允许在 UPDATE 语句中连接表.你需要用一个相关的子选择重写你的语句

                  Oracle does not allow joining tables in an UPDATE statement. You need to rewrite your statement with a co-related sub-select

                  像这样:

                  UPDATE system_info
                  SET field_value = 'NewValue' 
                  WHERE field_desc IN (SELECT role_type 
                                       FROM system_users 
                                       WHERE user_name = 'uname')
                  

                  有关 UPDATE 语句的(有效)语法的完整说明,请阅读手册:

                  For a complete description on the (valid) syntax of the UPDATE statement, please read the manual:

                  http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_10008.htm#i2067715

                  这篇关于SQL 错误:ORA-00933:SQL 命令未正确结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Oracle:将子查询中的多个结果组合成一个逗号分隔的值 下一篇:ORA-06508: PL/SQL: 找不到被调用的程序单元

                  相关文章

                  <small id='BxLWL'></small><noframes id='BxLWL'>

                    • <bdo id='BxLWL'></bdo><ul id='BxLWL'></ul>
                  1. <legend id='BxLWL'><style id='BxLWL'><dir id='BxLWL'><q id='BxLWL'></q></dir></style></legend>

                    <i id='BxLWL'><tr id='BxLWL'><dt id='BxLWL'><q id='BxLWL'><span id='BxLWL'><b id='BxLWL'><form id='BxLWL'><ins id='BxLWL'></ins><ul id='BxLWL'></ul><sub id='BxLWL'></sub></form><legend id='BxLWL'></legend><bdo id='BxLWL'><pre id='BxLWL'><center id='BxLWL'></center></pre></bdo></b><th id='BxLWL'></th></span></q></dt></tr></i><div id='BxLWL'><tfoot id='BxLWL'></tfoot><dl id='BxLWL'><fieldset id='BxLWL'></fieldset></dl></div>

                    1. <tfoot id='BxLWL'></tfoot>