Create table for csv file with badfile option : CSV Table « Table « Oracle PL / SQL






Create table for csv file with badfile option

SQL>
SQL>
SQL>  create table teachers_ext (
  2        first_name     varchar2(15),
  3        last_name      varchar2(15),
  4        phone_number   varchar2(12)
  5      )
  6      organization external (
  7        type oracle_loader
  8        default directory ext_data_files
  9         access parameters (
 10         records delimited by newlines
 11         badfile ext_data_files:'teacher.bad'
 12         fields terminated by ',')
 13       location ('teacher.csv')
 14     )
 15     reject limit unlimited;

Table created.

SQL>
SQL> drop table teachers_ext;

Table dropped.

SQL>


           
       








Related examples in the same category

1.Create table from external csv file
2.Create table based on csv file with 'nobadfile'
3.Grant all on directory then load the csv file
4.Use CSV file as External table