首先建立一个空的表.
>create table d1 as select * from deptno;
[oracle@localhost ~]$ cat 1.txt 数据文件 格式要正确
10, accounting, new york
20, research, dallas
30 , sales , hicago
40, operations, boston
[oracle@localhost ~]$ cat c.txt 控制文件
load data
infile '/home/oracle/1.txt'
into table d1
fields terminated by ',' optionally enclosed by '"'
(deptno,dname,loc)
[oracle@localhost ~]$ cat p.txt 处理文件
userid=scott/tiger
control=/home/oracle/c.txt
discard=/home/oracle/dis.txt
bad=/home/oracle/bad.txt
log=/home/oracle/log.txt
[oracle@localhost ~]$
[oracle@localhost ~]$ sqlldr parfile=p.txt 执行导入操作.
>select * from d1; 验证
阅读(646) | 评论(0) | 转发(0) |