728x90
# EXTERNAL TABLES
n EXTERNAL TABLES(scott)
# ext1.txt 파일을 /oracle/home/ 위치에 저장해야 한다 SQL> create directory emp_dir2 as '/home/oracle/'; SQL> drop table ext_emp; SQL> create table ext_emp (emp_id number(3), emp_name varchar2(10), hiredate date) organization external (type oracle_loader default directory emp_dir2 access parameters (records delimited by newline fields terminated by "," (emp_name char, emp_id char, hiredate date "yyyy/mm/dd") ) location ('emp1.txt') ); SQL> select * from ext_emp; EMP_ID EMP_NAME HIREDATE ---------- ---------- --------- 101 SMITH 15-MAR-01 102 JOHN 15-APR-02 101 SMITH 15-MAR-01 …………………………………………………………….. |
'빅데이터과정 > WORKSHOP 1 ' 카테고리의 다른 글
#25_140717_WSHOP_DATABASE LINK (0) | 2014.07.17 |
---|---|
#25_140717_WSHOP_DATA PUMP (0) | 2014.07.17 |
#25_140717_WSHOP_DIRECT PATH LOAD (0) | 2014.07.17 |
#24_140716_WSHOP_DIRECT LOAD INSERT (0) | 2014.07.16 |
#24_140716_WSHOP_복구 어드바이져 (0) | 2014.07.16 |