Mysql You can't specify target table 'newsalrecord' for update in FROM clause

这个问题是不能先select出同一表中的某些值,再update这个表(在同一语句中),即不能依据某字段值做判断再来更新某字段的值。
解决办法就是建立个临时的表。

境随心转而悦,心随境转而烦
原文地址:https://www.cnblogs.com/tomingto/p/11274406.html