1.€
[oracle@lenovo sqlload]$ more tb_sqlload_test.ctl
Load DATA
INFILE '/tmp/tb_sqlload_test.txt'
truncate into table tb_sqlload_test
FIELDS TERMINATED BY "€"
TRAILING NULLCOLS
(
name1 position(1:32) char(32),
name2 position(1:32) char(32)
)
3.tab键
[oracle@lenovo sqlload]$ more tb_sqlload_test.ctl Load DATA INFILE '/tmp/tb_sqlload_test.txt' truncate into table tb_sqlload_test FIELDS TERMINATED BY X'09' TRAILING NULLCOLS ( name1 position(1:32) char(32), name2 position(1:32) char(32) )
导入的时候避免中文乱码,需要加上如下的环境变量
export NLS_LANG=AMERICAN_AMERICA.UTF8
export LANG=en_US.UTF-8