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

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

0 Answers  


What you can do to remove data from the cache and query plans from memory for testing the performance of a query repeatedly?

0 Answers  


What is the difference between a primary index and a secondary index? What is a duplicate data entry in an index? Can a primary index contain duplicates?

5 Answers   IBM,


Explain about relational database management systems?

0 Answers  


Explain the role of indexing in databases?

0 Answers  






How to generate OIDS

0 Answers  


What are the three basic rules which are to be followed for the relational model of the database?

0 Answers  


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

0 Answers  


Explain about the hierarchical model of the database?

0 Answers  


How is data stored in dbms?

0 Answers  


What is a join and explain different types of joins?

2 Answers  


Explain the cube operator?

0 Answers  


Categories