expdp、impdp的query条件说明

来源:互联网 发布:matlab 定义符号矩阵 编辑:程序博客网 时间:2024/06/18 07:51

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

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"'

 

 

原创粉丝点击