postgreSql 备份复制表结构和数据 SQL语句

select * into de_cover_point_copy_2020_11_11 from de_cover_point;
select * into de_macro_station_copy_2020_11_11 from de_macro_station;
select * into de_micro_station_copy_2020_11_11 from de_micro_station;
select * into de_indoor_copy_2020_11_11 from de_indoor;
select * into de_cell_copy_2020_11_11 from de_cell;


select * into pl_cover_point_copy_2020_11_11 from pl_cover_point;
select * into pl_macro_station_copy_2020_11_11 from pl_macro_station;
select * into pl_micro_station_copy_2020_11_11 from pl_micro_station;
select * into pl_indoor_copy_2020_11_11 from pl_indoor;
select * into pl_cell_copy_2020_11_11 from pl_cell;


create table pl_cover_point_copy_2020_12_09 as select * from pl_cover_point;
create table pl_macro_station_copy_2020_12_09 as select * from pl_macro_station;
create table pl_micro_station_copy_2020_12_09 as select * from pl_micro_station;
create table pl_indoor_copy_2020_12_09 as select * from pl_indoor;
create table pl_cell_copy_2020_12_09 as select * from pl_cell;

select * into re_cover_point_copy_2020_11_11 from re_cover_point;
select * into re_macro_station_copy_2020_11_11 from re_macro_station;
select * into re_micro_station_copy_2020_11_11 from re_micro_station;
select * into re_indoor_copy_2020_11_11 from re_indoor;
select * into re_cell_copy_2020_11_11 from re_cell;


select * into st_cover_point_copy_2020_11_11 from st_cover_point;
select * into st_macro_station_copy_2020_11_11 from st_macro_station;
select * into st_micro_station_copy_2020_11_11 from st_micro_station;
select * into st_indoor_copy_2020_11_11 from st_indoor;
select * into st_cell_copy_2020_11_11 from st_cell;

 

原文地址:https://www.cnblogs.com/chuyuan/p/13955216.html