从cte select更新

问题描述

我需要根据以前的CTE语句更新表tb0。该代码类似于下面的伪代码:

with tb1 as(select tb_index from tb0 where tb_index=10),tb2 as (select tb_index,count(orders))total from orders inner join tb1 on tb1.tb_index=orders.tb_index)

update tb0 set tb0.status='a'
from tb2
inner join tb0.tb_index=tb2.tb_index
where
tb2.total>30

问题是,以上更新是否会考虑内部联接和where子句?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)