发布于 2016-03-31 23:24:53 | 129 次阅读 | 评论: 0 | 来源: 网友投递
Oracle关系数据库管理系统
Oracle Database,又名Oracle RDBMS,或简称Oracle。是甲骨文公司的一款关系数据库管理系统。到目前仍在数据库市场上占有主要份额。
2.授予用户权限,并建立目录对象
在此我们先建一个新用户
create user test identified by “123” default tablespace test quota unlimited on test; |
用户授权
SQL> grant create any directory to test; |
建立目录对象
SQL> conn test / 123 Connected. SQL> create directory ext as '/oracle/ext'; Directory created. |
3.建立外部表
SQL> create table exttable(
id number,name varchar2(10),i number
)organization external
(type oracle_loader
default directory ext
access parameters
(records delimited by newline
fields terminated by ','
)location('ext.dat')
);
4.测试
SQL> select * from exttable; ID NAME I ---------- ---------- ---------- 10 20 30 40 50 60 70 80 90 |
测试成功,可见在数据库中可以查询OS文件的数据