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

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

I need to export Oracle data from more than one table using the SELECT statement from a database with many schemas. Can you help?

    Requires Free Membership to View

    By submitting your registration information to SearchOracle.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchOracle.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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 first published in December 2009

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.