更新数据时,在where条件子句里面如果想使用子查询按条件更新部分数据,需要将查询的结果设为临时表。可以参考:
https://blog.csdn.net/poetssociety/article/details/82391523