mysql 根据某张表插入新表语句

时间:2024-07-15 13:31:32

INSERT into `pdm`.config_category_process_route(`id`, `tenant_code`, `company_code`, `conf_order_category`, `conf_order_type`, `category_id`, `process_line_id`, `is_write_by_order`, `remark`, `is_enable`, `is_delete`, `create_id`, `create_name`, `create_date`, `modified_id`, `modified_name`, `modified_date`)
SELECT REPLACE(UUID(),'-',''),NULL,NULL,'53','5301-09',`code`,'1-09',1,NULL,1,0,'导入0710','导入0710',now(),
'导入0710','导入0710',now() from pd_category WHERE id !='1'

REPLACE(UUID(),'-','') 是生成uuId