赞
踩
1. sql server
语句:select * into 要备份的表名 from 原表名
(1)--全表备份
select * into table_name_back from table;
(2) --备份部分列
select column1,column2,......into table_name_backa from code;
(3)--备份满足一定条件
select * into table_name_back from table where columnID = '2022080809';
2. Oracle
语句:create table ebname_user.user_INFOBack (要备份的表名) as select * from ebname_user.user_info(原表名);
(1) --创建备份表
create table ebname_user.IM_INFBF (备份表名) as (select * from ebname_user.IM_ROLE_INF (原表名) );
(2)--恢复备份表 (方法一)
drop table ebname_user.IM_ROLE_INF (正在使用表名);
create table ebname_user.IM_ROLE_INF as (select * from ebname_user.IM_INFBF);
(3)--恢复备份表 (方法二)
truncate table ebname_user.IM_ROLE_INF;
insert into ebname_user.IM_ROLE_INF select * from ebname_user.IM_INFBF;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。