Oracle Bulk Import

前端 未结 2 1466
無奈伤痛
無奈伤痛 2021-01-24 10:14

Bulk Import in Oracle

I have created the table emp and I need to import bulk data from a file into emp

For Ex

CREATE TABLE emp

( c1 NUMBER,

          


        
2条回答
  •  粉色の甜心
    2021-01-24 10:42

    You will have to use the inbuilt tool sql*loader to load data from external flat files into oracle.
    1. create a control file control.ctl

      load data
      infile 'reports.csv' 
      into table emp
      fields terminated by ',' optionally
      enclosed by '"'
      c1,c2
    

    2. data file is your reports.csv

    3.invoke sql*loader: $ sqlldr scott/tiger control=control.ctl
    Note: this is the name of the control file that you have made

提交回复
热议问题