MYSQL将查询结果插入新表
select count(*) from custinfo -- 101568
select count(*) from custinfo where length(trim(custinfo.`账号`))=23 -- 101233
select count(*) from custinfo where length(trim(custinfo.`账号`))=19 -- 335
select 101233+335
---------------------------------------------------------
select count(*) from custinfo where length(trim(custinfo.`账号`))<>19 and length(trim(custinfo.`账号`))<>23
create table temp23 as select * from custinfo where length(custinfo.`账号`)=23
create table temp19 as select * from custinfo where length(custinfo.`账号`)=19
select count(*) from temp23
select count(*) from temp19
---------------------------------------------------------------------
select temp23.*, private_accountinfo202006.`余额` from temp23 left join private_accountinfo202006 on temp23.`账号` = private_accountinfo202006.`账号`
union
select temp19.*, private_accountinfo202006.`余额` from temp19 left join private_accountinfo202006 on temp19.`账号` = private_accountinfo202006.`银行卡`

浙公网安备 33010602011771号