mysql将联合查询的结果写入另一张表中

insert
    into
        sys_country_set ( set_country_id,
        country_id ,
        REMARK ) select
            a.CODE_VALUE ,
            b.ID ,
            b.NAME
        from
            sys_code_value a
        join sys_country b on
            a.CODE_NAME = b.NAME
            and a.CODE_TYPE = '10053'

猜你喜欢

转载自blog.csdn.net/HelloKitty520123/article/details/88838240