How to create an external table.

Answer Posted / ravi satyadarshi

//1st of all create a directory to store ur external table
CREATE DIRECORY EMP_DIR AS '/FLAT_FILES' ;


// now write the following line of code to create an
external table at that directory

CREATE TABLE OLDEMP(ENO NUMBER,ENAME CHAR(20),DOB DATE,)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY EMP_DIR
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
BADFILE 'BAD_EMP')
LOGFILE 'LOG_EMP'
FIELDS TERMINATED BY ','
(ENO CHAR , ENAME CHAR DOB CHAR DATE_FORMAT
DATE MASK "DD-MON-YYYY"
)
)
LOCATION ('EMP1.TXT')
)
PARALLEL 5
REJECT LIMIT 200;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is data stored in dbms?

528


You have two tables with a one to many join based on a field named id. You need to find records in the parent table that are not represented in the child table. how would you accomplish this?

601


How can you fix a poorly performing query?

624


If a column is an image value type, how you can compare column values? How can you use this column in join clause?

598


Any sample or model question of punjab national bank for deputy manger IT or any sample of PNB.any1 plz do send on

1825






What are the 18 schemas?

615


Explain the process of the user request and data generating?

658


What are the three types of database design?

549


What is a database development?

524


Explain the cube operator?

607


Explain about relational operator join?

621


How long can an error message be in raiseerror function?

554


State the acid rules?

688


How to customize error conditions.

1706


Explain about xml databases?

626