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

Explain about the hierarchical model of the database?

580


Explain the role of indexing in databases?

642


Pgm A calls Pgm B and pgm B uses cursor, when pgm B is called second time, the program is abending saying the cursor is opened? Why?

2006


How long can an error message be in raiseerror function?

548


What is normalization? Explain different levels of normalization?

59810






How to use timestamp datatypes

1576


Write the fastest query to find out how many rows exist in a table?

661


On friday, you issued several insert statements using query analyzer. You then verified the data had been correctly entered with a select statement on monday, your users report that the data is not there what happened?

561


In which database can extended stored procedures be added?

528


Explain about the storage and physical database design?

529


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?

588


How can you fix a poorly performing query?

622


Explain about xml databases?

624


How to generate OIDS

1662


Who are end users in dbms?

548