17,377
社区成员
发帖
与我相关
我的任务
分享
Load DATA
INFILE 'test_direct.dat'
discardfile 'test_direct.dsc'
append
into table testf
when empid != ''
fields terminated by '|'
(
empid integer EXTERNAL,
empname char(20),
salary integer EXTERNAL
)
into table testg
when empid != ''
fields terminated by '|'
(
empid integer EXTERNAL,
empname char(20),
salary integer EXTERNAL
)
2010|zz|5600|
2011|gg|5700|
2012|mm|5800|
2018|sf|15800|
2020|sd|75800|
2021|ak|65800|
LOAD DATA
INFILE 'filename.txt'
append
INTO TABLE table1
WHEN col1!= ' '
fields terminated by " "
TRAILING NULLCOLS
(col1,col2)
INTO TABLE table2
WHEN col2!= ' '
(col1 POSITION(1:11) CHAR,
col2 POSITION(12:18) CHAR)
create table testf
(
EMPID NUMBER(4),
EMPNAME VARCHAR2(20),
SALARY NUMBER(16,2)
);
create table testg as select * from testf;