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` ..

        DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ... why syntax error?(DELETE FROM `table` AS `alias` ... WHERE `alias`.`column` ... 为什么语法错误?)

            • <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` ... 为什么语法错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to delete duplicate records in mysql database?(如何删除mysql数据库中的重复记录?)
                  Python Pandas write to sql with NaN values(Python Pandas 使用 NaN 值写入 sql)
                  MySQL Insert amp; Joins(MySQL 插入 amp;加入)
                  MySQL concat() to create column names to be used in a query?(MySQL concat() 创建要在查询中使用的列名?)
                  NodeJS responded MySQL timezone is different when I fetch directly from MySQL(当我直接从 MySQL 获取时,NodeJS 响应 MySQL 时区不同)
                  WHERE datetime older than some time (eg. 15 minutes)(WHERE 日期时间早于某个时间(例如 15 分钟))
                • <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>
                              <tbody id='W2Kls'></tbody>

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