实现逻辑:设定好两张表之间关联关系,根据关系关联可以执行update操作语句,具体SQL参考如下:
update table_01 set user_id = (select x_user.user_id from x_user where table_01.code = x_user.id and table_01.`name` = x_user.`name`);
实现逻辑:设定好两张表之间关联关系,根据关系关联可以执行update操作语句,具体SQL参考如下:
update table_01 set user_id = (select x_user.user_id from x_user where table_01.code = x_user.id and table_01.`name` = x_user.`name`);