Oracle 备份表数据

时间:2022-04-18 05:11:56
--备份表数据
select * from t_owners;
--创建备份表
create table t_owners_copy (
id number,
name varchar2(100),
addressid number,
housenumber varchar2(100),
watermeter varchar2(100),
adddate date,
ownertypeid number
)
drop table t_owners_copy
select * from t_owners_copy
--备份一部分数据
insert into t_owners_copy(id,name) select id,name from t_owners
--备份全部数据
insert into t_owners_copy select * from t_owners