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

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

      2. <legend id='QnmqC'><style id='QnmqC'><dir id='QnmqC'><q id='QnmqC'></q></dir></style></legend>
      3. <tfoot id='QnmqC'></tfoot>
          <bdo id='QnmqC'></bdo><ul id='QnmqC'></ul>
      4. DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ..

        时间:2023-06-25

            • <legend id='49CcW'><style id='49CcW'><dir id='49CcW'><q id='49CcW'></q></dir></style></legend>

                  <tbody id='49CcW'></tbody>
                  <bdo id='49CcW'></bdo><ul id='49CcW'></ul>

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

                  <small id='49CcW'></small><noframes id='49CcW'>

                  <tfoot id='49CcW'></tfoot>

                  本文介绍了DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ... 为什么语法错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我用 MySQL 试过这个:

                  I tried this with MySQL:

                  DELETE FROM `contact_hostcommands_relation` AS `ContactHostCommand` WHERE (`ContactHostCommand`.`chr_id` = 999999) LIMIT 1
                  

                  我明白了:

                  #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (`ContactHostCommand`.`chr_id` = 999999) LIMIT 1' at line 1
                  

                  注意:此查询是自动生成的,条件基于表别名.

                  Note: This query is automatically generated and conditions are based on table aliases.

                  为什么会出现这个错误?

                  Why I get this error?

                  有没有办法在 where 子句中使用表别名?

                  Is there any way to use table aliases in where clause?

                  这是特定于 MySQL 的吗?

                  Is this MySQL specific?

                  推荐答案

                  你可以这样使用 SQL:

                  You can use SQL like this:

                  DELETE FROM ContactHostCommand 
                  USING `contact_hostcommands_relation` AS ContactHostCommand 
                  WHERE (ContactHostCommand.`chr_id` = 999999) 
                  LIMIT 1
                  

                  这篇关于DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ... 为什么语法错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:ORA-00972 标识符太长别名列名 下一篇:为什么 Oracle SQL 不允许我们在 GROUP BY 子句中使用列别名?

                  相关文章

                • <legend id='W2Kls'><style id='W2Kls'><dir id='W2Kls'><q id='W2Kls'></q></dir></style></legend>
                  • <bdo id='W2Kls'></bdo><ul id='W2Kls'></ul>
                • <tfoot id='W2Kls'></tfoot>

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

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