insert into testersPage (testersId ,id,status) select id as testersId , CONCAT('P',md5(uuid())) as id, 1 as status from testers ;
新表: testersPage(测试表页面) 旧表:testers(测试表)
需求:新表关联旧表
从旧表中获取id: select id as testersId from testers ;
生成uuid: CONCAT('P',md5(uuid())) 32位+1 位('P'开头首字母)
1 as status :作为常量输入
公式: insert into 表名(字段)值