Oracle data loading toolSQL* loader

 1. Create a table for testing
create table TEST_TICE
(
  id         NUMBER(11),
  name    VARCHAR2(255)
);
2. Prepare a sqlloader control file (file name.ctl) and data file (.csv)
load data                                --导入命令
infile 'C:\Users\ChenChaoJie\Desktop\YUAN_TICE.csv'         --指定导入的文件路径
into table TEST_TICE                     --导入哪个表
insert                                   --导入的方式
----append:原先的表有数据就加在后面
----insert:(默认值)装载空表,如果原先的表有数据 SQLLOADER 会停止
----replace:原先的表有数据原先的数据会全部删除
----truncate:指定的内容和 REPLACE 的相同会用 TRUNCATE 语句删除现存数据
fields terminated by ','   --指定分隔符
trailing nullcols              
(id,name)
3. Enter the command line in the cmd window

The respective meanings: sqlldr username/password control=control file location

sqlldr scott/123456 control=C:\Users\ChenChaoJie\Desktop\loadtest.ctl

Guess you like

Origin blog.csdn.net/weixin_57024726/article/details/133162760