Oracle sql loader 使用案例
Listing 1:
----------------------
dir *.csv
type abc.csv
sqlplus scott/tiger@orcl
create table emp1 (name varchar2(80), salary number);
host
notepad abc.ctl
load data
infile abc.csv
into table emp
fields terminated by ','
TRAILING NULLCOLS
(name, salary)
sqlldr scott/tiger@orcl abc.ctl
exit
show user
select * from emp1;
----------------------
Listing 2:
---------------------
set heading off
set pagesize 0
spool c:\whatever.txt
select object_name ||','||object_type from all_objects
spool off
create table loaded as
select object_name, object_type from all_objects
where 1=0;
load data
infile 'c:\whatever.txt'
into table loaded truncate
when object_type <> 'INDEX'
fields termindated by ','
(
OBJECT_NAME,
OBJECT_TYPE "TRIM (:object_type)"
)
sqlldr control=c:\whatever.ctl log=c:\whatever.log
-----------------------------------
present by dylan.
最新文章
- Linux中检索文件
- C++ MFC打开文件的流程
- 状态压缩 HDU 1565
- java高薪之路__009_网络
- C语言 百炼成钢13
- POST中文乱码解决方案
- Oracle top N实现
- Dubbo源码学习--服务是如何引用的
- MFC新建工程中目录包含中文,资源文件打开失败
- [Loadrunner参数化]一个文件输两列参数的取值
- python的map函数
- hdu1796 How many integers can you find 容斥原理
- Using LACP with a vSphere Distributed Switch 5.1
- 最重要的7个Drupal内核模板文件
- 锐捷 Fat/Fit Ap切换
- spring boot redis ->; @Cacheable,@CacheEvict, @CachePut
- 骗分大法之-----分块||迷之线段树例题a
- Linux下LAMP服务器的搭建
- linux之nginx的安装
- session------>;防表单重复提交
热门文章
- JavaScript与C#互通的DES加解密算法
- 06 java 基础:java 循环 递归
- <;<;Javascript Patterns>;>;阅读笔记 -- 第2章 基本技巧(一)
- Qt基础——让使用Designer创建的UI也能自动适应窗口大小
- 查看Android手机数据库
- Windows 下安装 tensorflow &; keras &; opencv 的避坑指南!
- XV6操作系统代码阅读心得(二):进程
- PHP 笔记——PDO操作数据库
- Educational Codeforces Round 12 C. Simple Strings 贪心
- 2015 UESTC 数据结构专题H题 秋实大哥打游戏 带权并查集