INSERT INTO system_organize
(organize_id,organize_code,organize_name)
SELECT DISTINCT REPLACE(UUID(),‘-‘,‘‘),a_code,a_name FROM sys_fee_a
REPLACE(UUID(),‘-‘,‘‘)使用了UUID,并且把-替换掉
select查出数据后直接inset到另一张表,布布扣,bubuko.com
时间: 2024-12-25 11:46:41
INSERT INTO system_organize
(organize_id,organize_code,organize_name)
SELECT DISTINCT REPLACE(UUID(),‘-‘,‘‘),a_code,a_name FROM sys_fee_a
REPLACE(UUID(),‘-‘,‘‘)使用了UUID,并且把-替换掉
select查出数据后直接inset到另一张表,布布扣,bubuko.com