如何解决从“表”中删除为“别名” ...在“别名列”中...为什么语法错误?
您可以这样使用sql:
DELETE FROM ContactHostCommand
USING `contact_hostcommands_relation` AS ContactHostCommand
WHERE (ContactHostCommand.`chr_id` = 999999)
LIMIT 1
解决方法
我尝试使用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
注意: 此查询是自动生成的,条件基于表别名。
为什么会出现此错误?
有什么方法可以在where子句中使用表别名?
这是MySQL特有的吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。