Chinaunix首页 | 论坛 | 博客
  • 博客访问: 50346
  • 博文数量: 25
  • 博客积分: 2015
  • 博客等级: 大尉
  • 技术积分: 215
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-16 17:34
文章分类
文章存档

2008年(25)

我的朋友

分类: Oracle

2008-03-12 13:49:32

首先建立一个空的表.
>create table d1 as select * from deptno;
 
[oracle@localhost ~]$ cat 1.txt    数据文件  格式要正确
10,     accounting,     new york
20,     research,        dallas
30 ,    sales    ,      hicago
40,     operations,      boston
[oracle@localhost ~]$ cat c.txt    控制文件
load data
infile '/home/oracle/1.txt'
into table d1
fields terminated by ',' optionally enclosed by '"'
(deptno,dname,loc)
[oracle@localhost ~]$ cat p.txt   处理文件
userid=scott/tiger
control=/home/oracle/c.txt
discard=/home/oracle/dis.txt
bad=/home/oracle/bad.txt
log=/home/oracle/log.txt
[oracle@localhost ~]$
[oracle@localhost ~]$ sqlldr parfile=p.txt  执行导入操作.
 
>select * from d1;  验证
 
阅读(624) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~