1.创建临时表
CREATE TEMPORARY TABLE t SELECT * FROM base_user;
2. mysql事件(类似sqlserver的作业)
默认开启事件:在my.ini中加入 event_scheduler=ON
或者执行sql: set global event_scheduler =1;
CREATE EVENT `TestEvent` ON SCHEDULE EVERY 1 DAY STARTS '2018-12-27 05:00' ON COMPLETION NOT PRESERVE ENABLE DO insert into test(name) value('Linky');
参考: https://www.cnblogs.com/geaozhang/p/6821692.html
3.导入数据
:在mysql命令行中: source d:/dbname.sql