MySQL with a table, two fields swap values

update t_hplc_family_import a, t_hplc_family_import b
set 
    a.f_name= b.f_num, a.f_num= b.f_name
where a.id = b.id 
AND a.id>=498

 

Guess you like

Origin www.cnblogs.com/smileblogs/p/12119149.html