update字段中带select
UPDATE tb_report_type A INNER JOIN (SELECT LEVEL_CODE FROM tb_report_type WHERE id = ‘ED894BE001CE4F47A2916287A491B4E1‘) B
SET A.LEVEL_CODE = CONCAT(B.LEVEL_CODE,‘-‘,A.id) WHERE A.PARENT_ID = ‘ED894BE001CE4F47A2916287A491B4E1‘
时间: 2024-10-24 05:16:45