数据库
首页 > 数据库> > mysql 复制记录的某个字段到其他记录

mysql 复制记录的某个字段到其他记录

作者:互联网

1. 将name=234记录的period字段值赋给name=123记录的period字段

update table1 set period = (select b.period from (select period from table1 where  name='234') b)  where name='123';

标签:table1,name,记录,period,字段,123,mysql,234
来源: https://www.cnblogs.com/virgosnail/p/15188097.html