一、表数据备份与还原
creat table 备份表 select * from 原表 where
insert into 原表 select * from 备份表
二、利用备份表还原原表部分字段数据
update 原表 t
   set (age, idnumber) =
  (select age, idnumber from 备份表 b where b.stuid = t.stuid)
     where exists
(select 1 from 备份表 b
           where b.stuid = t.stuid
              and b.stuname = ‘张三‘);
三、,exp导出命令(cmd下运行)
1、导出数据库
exp 用户名/密码@orcl file=d:\daochu.dmp full=y
2、 导出表空间
 exp 用户名/密码@orcl  file=d:\daochu.dmp  tablespaces=(testspace)
3、导出用户
exp 用户名/密码@orcl file=d:\daochu.dmp owner=(system,sys)
4、导出表
exp 用户名/密码@orcl file=d:\daochu.dmp tables=table1,table2
备注:buffer=4096(指定数据缓存区的大小) log=d:\student.log(指定日志保存路径),例如:

四、imp导入命令(cmd下运行)
imp 用户名/密码@orcl file=d:/daochu.dmp full=y ignore=y
备注:导入数据前需用sys用户创建普通用户,并新建表空间、赋权。
 
原文:https://www.cnblogs.com/diandixingyun/p/11589960.html