1.创建临时表并插入查询结果
-- 创建并复制数据到临时表
create table 临时表名 as select *
from 查询表;
2.清空表
--清空临时表
truncate table 表名;
3.查询数据插入到临时表
insert into 临时表 select * from 查询表;
1.创建临时表并插入查询结果
-- 创建并复制数据到临时表
create table 临时表名 as select *
from 查询表;
2.清空表
--清空临时表
truncate table 表名;
3.查询数据插入到临时表
insert into 临时表 select * from 查询表;