UPDATE ac_device m
LEFT JOIN ac_device ad ON ad.id = m.id
SET m.`name` = CONCAT(
'更新,
RIGHT (ad.`code`, 9)
)
WHERE
m.`name` IS NULL;
UPDATE ac_device SET remark = `code` WHERE remark IS NULL
UPDATE ac_device m
LEFT JOIN ac_device ad ON ad.id = m.id
SET m.`name` = CONCAT(
'更新,
RIGHT (ad.`code`, 9)
)
WHERE
m.`name` IS NULL;
UPDATE ac_device SET remark = `code` WHERE remark IS NULL