1:create table test_load(id number(10),uname varchar2(20), phone varchar2(20));
2:控制文件:/home/oracle/sqlldr/loader.ctl
load data
infile '/home/oracle/sqlldr/datafile.txt'
append into table test_load
fields terminated by "," optionally enclosed by '"' --fields terminated by ","表示使用逗号分隔,OPTIONALLY ENCLOSED 表示数据应由特殊字符括起来
( id, uname, phone )
3:
数据文件:/home/oracle/sqlldr/datafile.txt
001,"david",0551-1234567
002,"dave",0551-7654311
4:
sqlloader命令:
sqlldr scott/tiger control=/home/oracle/sqlldr/loader.ctl log=/home/oracle/sqlldr/a.log
阅读(1313) | 评论(0) | 转发(0) |