方法一
create table tmp as select a.id from t_user t join temp a on t.email = a.email;
方法二
insert into t_user (id,username,password,email,user_type,status) select id,replace(email,'@','_'),password,email,'0','0' from temp;
这两个sql都是从另外一张中获取的数据插入了当前表。
本文出自 “乔磊的博客 学习 进步” 博客
bitscn.com
