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

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

0 Answers  


What are the three types of database design?

0 Answers  


What is the physical representation for a many-to-many relationship?

0 Answers  


How to use online Backups?

0 Answers  


Can you instantiate a COM object by using T-SQL?

1 Answers  


How to customize error conditions.

0 Answers  


Explain the cube operator?

0 Answers  


How can you log an error to the server event log from a stored procedure?

0 Answers  


What is data modeling with example?

0 Answers  


Explain the role of indexing in databases?

0 Answers  


Given an employee table, how would you find out the second highest salary?

9 Answers  


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

0 Answers  


Categories