类似这样
create procedure merge_table()
BEGIN
select id,name into test3 from test2;
insert into aa select id,name from test1;
drop table test1;
alter table test3 rename to test1;
end;
类似这样
create procedure merge_table()
BEGIN
select id,name into test3 from test2;
insert into aa select id,name from test1;
drop table test1;
alter table test3 rename to test1;
end;
本文标题:mysql 数据表合并
本文链接:https://www.haomeiwen.com/subject/pnxvuhtx.html
网友评论