Use CSV file as External table : CSV Table « Table « Oracle PL / SQL






Use CSV file as External table

 

create directory ext_data_files as 'C:\';

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 (fields terminated by ',' )
  location ('teacher.csv')
)
reject limit unlimited
/


select first_name ||' '|| last_name "Name", phone_number "Phone"
from teachers_ext
order by last_name
/

 








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.Grant all on directory then load the csv file