Search code examples
oracleoracle12cexpdp

expdp table with specific columns


I have a table in my database with 100 columns.

I am only interested to create a dump using expdp with only 3 specific columns from it.

Is it possible to do this directly from the expdp command?


Solution

  • Oracle 12c has a datapump feature views_as_table that may work. Create a view against your source table, with just the columns you want to export, then export the view:

    create or replace view view_1 as 
      select <desired columns> from table_1;
    
    expdp user/password views_as_tables=view_1 directory=data_pump_dir dumpfile=data.dmp