ITPub博客

首页 > 数据库 > Oracle > expdp impdp的query条件说明

expdp impdp的query条件说明

Oracle 作者:zhongguo87 时间:2015-03-18 11:57:26 0 删除 编辑

如果要导出多个表的数据,但是对某一个表或者某几个表的数据有限制

expdp scott/tiger directory=dumpdir dumpfile=a.dmp tables=emp,dept query=/'emp:/"where deptno=20/"/'

 

expdp scott/tiger directory=dumpdir dumpfile=a1.dmp tables=emp,dept query=/'dept:/"where deptno=20/"/',/'emp:/"where deptno /<=20/"/'

注意,两个条件可以一起写,< 、>前面都要加入转义字符。

 

如果写在参数文件中,就不要加入转义字符,如下所示:

expdp scott/tiger 11.par

11.par的内容如下所示:

DIRECTORY = dumpdir
DUMPFILE = exp_tab.dmp
LOGFILE = exp_tab.log
SCHEMAS = scott
INCLUDE = TABLE:"IN ('EMP','DEPT')"
QUERY = 'EMP:"where deptno =20"','DEPT:"where deptno <=20"'

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9044178/viewspace-1464278/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-22

  • 博文量
    10
  • 访问量
    11978