mysql如何对一张表同时进行查询和更新

mysql如何对一张表同时进行查询和更新

mysql不允许对同一张表同时进行查询和更新,可以使用临时表处理

update actor a inner join (select upper(last_name) last_name from actor) b

on b.last_name = a.first_name

set a.first_name = b.last_name;

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: