gpt4 book ai didi

mysql复杂查询运行中

转载 作者:行者123 更新时间:2023-11-29 23:30:55 25 4
gpt4 key购买 nike

我对以下查询有疑问:

Update `visitors-processed` as t1 
SET t1.`landedon`="land"
where t1.`Attributes-ip-date-landedon` in
(SELECT distinct t2.`Attributes-ip-date-landedon`
from `visitors-processed` as t2
group by t2.`Attributes-ip-date-landedon`)

它给了我

error #1093 - You can't specify target table 't1' for update in FROM clause

有什么建议吗?

最佳答案

当您尝试在表上工作并在一个查询中从同一个表中进行选择时,MySQL 可能会感到不安。请参阅here 。不过,有一些方法可以解决这个问题。

参见-

简短回答:这可能是重复的。

关于mysql复杂查询运行中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26583523/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com