Q

Exporting a column from a table for later import

I want to export a column in a table and import it later. I have faced a situation where I had to export only four colunms in a table containing 20 columns.

I want to export a column in a table like (column ename in emp table) and import it later. I have faced a situation where I had to export only four colunms in a table containing 20 columns.
Oracle's export utility will export all columns of a table. You cannot use exp or 10g's new Data Pump, expdp, to export only specific columns of a table. If you want to export just one column of data from a table, then I would recommend simply using SQL*Plus and spooling the output to a file, similar to the following:
spool emp_ename.txt
SELECT ename FROM scott.emp;
spool off
With the above commands in SQL*Plus, you will have a text file containing the output of just the ENAME column of the SCOTT.EMP table.
This was last published in September 2005

Dig Deeper on Oracle database backup and recovery

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close