query参数用来带条件导出表的数据,格式为
win: exp test/test query='where name=''test''' tables=tab1 file=tabl1.dmp log=tab1l
unix: exp test/test query=/"where name=/'test/'/" tables=tab1 file=tabl1.dmp log=tabl1
但是它也有局限:
query后不能是多表关联,比如说以下这种格式
exp test/test query='where name=''test'' and tab1.id=tab2.id' tables=(tab1,tab2) file=tabl1.dmp log=tab1l
但是query可以用来约束多张表的数据导出,前提是这些表拥有相同的字段,并以这些字段作为导出条件:
exp test/test query='where name=''test'' ‘ tables=(tab1,tab2) file=tabl1.dmp log=tab1l