mysql:You can't specify target table 'sessions' for update in FROM clause

更新数据时,在where条件子句里面如果想使用子查询按条件更新部分数据,需要将查询的结果设为临时表。
可以参考:

https://blog.csdn.net/poetssociety/article/details/82391523

猜你喜欢

转载自www.cnblogs.com/zhf123/p/11774547.html