Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Define an External Table with a Text File
How To Define an External Table with a Text File? - Oracle DBA FAQ - Loading and Exporting Data
✍: FYIcenter.com
You can use the CREATE TABLE statement to create external tables. But you need to use ORGANIZATION EXTERNAL clause to specify the external file location and the data access driver. The tutorial exercise below shows you how to define an external table as a text file:
>sqlplus /nolog
SQL> connect HR/fyicenter
SQL> CREATE TABLE ext_fyi_links (
id NUMBER(4),
url VARCHAR2(16),
notes VARCHAR2(16),
counts NUMBER(4),
created DATE
) ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY test_dir
LOCATION ('ext_fyi_links.txt')
);
Table created.
SQL> SELECT table_name, tablespace_name, num_rows
FROM USER_TABLES;
TABLE_NAME TABLESPACE_NAME NUM_ROWS
--------------------- ---------------------- ----------
REGIONS USERS 4
LOCATIONS USERS 23
DEPARTMENTS USERS 27
JOBS USERS 19
EMPLOYEES USERS 107
JOB_HISTORY USERS 10
FYI_LINKS USERS 2
EXT_FYI_LINKS
COUNTRIES 25
2007-04-30, 5178👍, 0💬
Popular Posts:
How To Select an Oracle System ID (SID)? - Oracle DBA FAQ - Creating New Database Instance Manually ...
.NET INTERVIEW QUESTIONS - How can you avoid deadlock in threading? A good and careful planning can ...
What is the difference between delegate and events? ã Actually events use delegates in bottom. But ...
How Do You Uninstall JUnit Uninstalling JUnit is easy. Just remember these: Delete the directory tha...
How To Truncate an Array? - PHP Script Tips - PHP Built-in Functions for Arrays If you want to remov...