Q
Manage Learn to apply best practices and optimize your operations.

How to use SQL Plus to export Oracle data from more than one table

Learn how to use SQL Plus to export Oracle data from more than one table with the SPOOL command in this tip from Oracle expert Brian Peasland.

I need to export Oracle data from more than one table using the SELECT statement from a database with many schemas. Can you help?
First, you'll have to craft your SQL statement. Then in SQL*Plus, you can use the SPOOL command to write the results of the query to a file. Try the following in SQL*Plus:

 

 SET PAGESIZE 0 SET HEADING OFF SET FEEDBACK OFF SPOOL query_export.txt SELECT ……; SPOOL OFF
The results will be a fixed field text file which contains your data.
This was last published in December 2009

Dig Deeper on Oracle database design and architecture

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.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close