What Is the Quickest Way to Export a Table to a Flat File?
Submitted by: AdministratorThe quickest way to export a table to a flat file is probably to use the SQL*Plus SPOOL command. It allows you to record SELECT query result to a text file on the operating system. The following tutorial exercise shows you how control the output format, start the spooler, and dump all record from a table to a flat text file:
>mkdir oraclexe est
>sqlplus /nolog
SQL> connect HR/globalguideline
SQL> SET HEADING OFF;
SQL> SET FEEDBACK OFF;
SQL> SET LINESIZE 1000;
SQL> SPOOL oraclexe estemployees.txt;
SQL> SELECT * FROM EMPLOYEES;
......
SQL> SPOOL OFF;
You should get all records in employees.txt with fixed length fields.
Submitted by: Administrator
>mkdir oraclexe est
>sqlplus /nolog
SQL> connect HR/globalguideline
SQL> SET HEADING OFF;
SQL> SET FEEDBACK OFF;
SQL> SET LINESIZE 1000;
SQL> SPOOL oraclexe estemployees.txt;
SQL> SELECT * FROM EMPLOYEES;
......
SQL> SPOOL OFF;
You should get all records in employees.txt with fixed length fields.
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | What Is the Oracle Implicit Cursor? |
☺ | How To Recover a Dropped Table in Oracle? |
☺ | How Oracle Handles Dead Locks? |
☺ | What Is the Relation of a User Account and a Schema? |
☺ | What Is Input Buffer in SQL*Plus? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Forms Reports Interview Questions. |