TXT文件导入到ORACLE数据库中

时间:2021-08-11 20:39:33
 1 --创建表 (sqlplus执行)
 2 drop table cjw;
 3 create table cjw (name varchar(222),phone number,province varchar(222),city varchar(222),born varchar(222),adressJob varchar(2222),mail varchar(222));
 4 
 5 ### txt导入到oracle
 6 cat >load.ctl <<END
 7 load data
 8 append into table scott.cjw
 9 fields terminated by '|'
10 TRAILING NULLCOLS
11 (name,
12 phone,
13 province,
14 city,
15 born,
16 adressJob,
17 mail)
18 END
19 
20 ### 导入数据 
21 sqlldr userid=scott/gmcc1234 control=load.ctl data=cjw.dat rows=1000 bindsize=2560000