mysql将视图数据迁移到表中
#字段必须完全一样
INSERT into table1(所有字段) select * from data.视图
二、指定表数据插入到另一个表中
1、单表导入数据
将teble_2表的所有数据写入到table_1表中
INSERT INTO table_1 SELECT * FROM table_2;
2、指定字段(适合插入多表)
将teble_2表的指定列写入到table_1表中,@row:=@row+1自动增加id
INSERT INTO table_1 SELECT @row:=@row+1,userid,aid,time,xxxxx1,xxxx2 FROM table_2;

浙公网安备 33010602011771号