1.文本文件student数据如下
1001,李三,90
1002,王五,87
1002,李四,86
2.在oracle数据库中scott用户创建表student表
create table student (id int ,name varchar2(20),grade int);
3.编写sqlldr控制文件student.ctl
load data
infile 'e:\student.txt'
into table student
fields terminated by ','
(
id,
name,
grade
)
4.导入数据
C:\>sqlldr scott/tiger control=e:\student.ctl log=e:\log.log
1001,李三,90
1002,王五,87
1002,李四,86
2.在oracle数据库中scott用户创建表student表
create table student (id int ,name varchar2(20),grade int);
3.编写sqlldr控制文件student.ctl
load data
infile 'e:\student.txt'
into table student
fields terminated by ','
(
id,
name,
grade
)
4.导入数据
C:\>sqlldr scott/tiger control=e:\student.ctl log=e:\log.log
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26937943/viewspace-2123695/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26937943/viewspace-2123695/
本文介绍如何通过Oracle的SQL*Loader工具将本地文本文件中的学生数据导入到Oracle数据库中。具体步骤包括:创建表结构、编写SQL*Loader控制文件,并执行数据导入命令。
979

被折叠的 条评论
为什么被折叠?



