您的位置:首页 > 数据库 > Oracle

oracle导入txt数据文件--sql语句

2013-01-22 12:59 561 查看
1.写控制文件格式如下(下面是我自己的,你把表名该成你自己的表,字段该成你的字段就可以了):
load data
INFILE "D:\\user_user_test.txt"
into table USER_USER_TEST
truncate
fields terminated by ',' optionally enclosed by '"'
(
USERID,
CITYID,
USERNAME,
PWD,
CREATETIME
)
2.把控制文件和数据文件放在同一个目录(建议)
3.执行sqlldr userid=scott/anwei@orcl control="D:\ceshi\user_user_test.ctl"
log=D:\ceshi\user_user_test.log bad=d:\ceshi\bad.log 命令



                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: