EXPDP with Select Query Clause in Oracle
For exporting table data with query condition
1. Create the directory if not present.
create directory EXPDIR as 'D:\ORADUMP'
2. We export data from last 30 new employees to expdp dump file
select * from HR.EMPLOYEES WHERE created > sysdate-30;
3. Run the EXPDP command for export query data.
EXPDP Directory=EXPDIR dumpfile=employee.dmp logfile=employeeexp.log tables=hr.employees query=hr.employees:"WHERE created > sysdate - 30";
IMPDP Directory=EXPDIR dumpfile=employee.dmp logfile=employeeimp.log