1、执行操作图
2、源代码
sqlplus sys/123456 as sysdba
--建临时表
create temporary tablespace Y
tempfile 'E:\Oracle\Oracle11g\OracleData\oradata\orcl\tempss.dbf'
size 20M reuse extent management local uniform size 16M;
--建用户
create user H_J_Y_09
identified by 123456
temporary tablespace Y;
--授权
grant sysdba, connect, resource to H_J_Y_09;
create or replace directory dataDir as 'E:\Oracle\Data';
grant read,write on directory dataDir to H_J_Y_09;
conn H_J_Y_09/123456
create table ext_books(
上市时间 varchar(10),
ISBN varchar2(5),
书名 varchar2(30),
定价 number(5, 2),
出版社名称 varchar2(30),
作者 varchar2(30)
)organization external(
type oracle_loader
default directory dataDir
access parameters(
fields terminated by ','
)
location ('bookData.csv')
)
parallel
reject limit unlimited;
col 上市时间 justify center format a8;
col ISBN justify center format a5;
col 书名 justify center format a15;
col 出版社名称 justify center format a17;
col 定价 justify center format $999,999.00;
col 作者 justify center format a12;
select * from ext_books;
3、导入的:表数据
链接:https://pan.baidu.com/s/1GmwW4BUCoOEmbYWPYjERSw
提取码:9xq9