How to create an external table.



How to create an external table...

Answer / 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

More DB Development Interview Questions

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

0 Answers  


What are triggers? How many triggers you can have on a table?

2 Answers   Ramco,


Explain what a database is?

0 Answers  


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?

0 Answers  


How to read and create .LDC data files which are used by linguatic dictionary.

0 Answers  






How to create an external table.

1 Answers  


Can an extended stored procedure be called from inside a user-defined function?

0 Answers  


What is bit datatype and what's the information that can be stored inside a bit column?

2 Answers  


What is dbms and its application?

0 Answers  


Explain about network model?

0 Answers  


How to combine two function together?

0 Answers  


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?

0 Answers   IBM,


Categories