Load CSV data to a table : CSV Load « Table « Oracle PL / SQL






Load CSV data to a table

 

set echo on
create table dept
( deptno  number(2),
  dname   varchar2(14),
  loc     varchar2(13)
)
/

LOAD DATA
INFILE *
INTO TABLE DEPT
FIELDS TERMINATED BY ','
(DEPTNO,
  DNAME,
  LOC
)
BEGINDATA
10,Sales,BC
20,Accounting,BC
30,Consulting,BC
40,Finance,BC

drop table dept;

 








Related examples in the same category

1.Load data and set field terminated sign and OPTIONALLY ENCLOSed sign
2.FIELDS TERMINATED BY WHITESPACE
3.Indicate columns in load data statement
4.Set value position in load statement
5.Set ENTIRE_LINE in load data statement
6.Leave start position open in load data statement
7.Set char(count) for load data statement
8.Set date format in load data statement
9.Use string function in load data statement
10.Set entry line in load data statement
11.Trailing null columns when loading data
12.use case statement to check the value in load data statement
13.Use user-defined columns in load data statement