Grant all on directory then load the csv file : CSV Table « Table « Oracle PL / SQL






Grant all on directory then load the csv file

 

grant all on directory ext_data_files to scott;

create table teachers_ext (
  first_name     varchar2(15),
  last_name      varchar2(15),
  phone_number   varchar2(12)
)
organization external (
  type oracle_loader
  default directory ext_data_files
   access parameters (
    records delimited by newlines
    badfile ext_data_files:'teacher.bad'
    fields terminated by ',')
  location ('teacher.csv')
)
reject limit unlimited;

 








Related examples in the same category

1.Create table from external csv file
2.Create table based on csv file with 'nobadfile'
3.Create table for csv file with badfile option
4.Use CSV file as External table