http://blog.sina.com.cn/s/blog_7930c09d0100xiig.html
Oracle 外部表
环境: winxp + oracle10g
外部数据表是只读的,只能对外部表执行select操作,insert, update,delete不能执行。外部表的数据不保存在数据库里,所以不能为外部表创建索引。ANALYZE语句不支持采集外部表的统计数据,应该使用DMBS_STATS包来采集外部表的统计数据。
步骤:
1.
0001,hawke_test,03-OCT-11 0002,malei_test,03-OCT-11 |
2.
SQL> create directorydbtestdir as 'E:\oracle\';
Directory created.
Grant succeeded.
SQL> grant write ondirectory dbtestdir to scott;
Grant succeeded.
3.
4.
SQL> CREATE TABLEexternal_tab Table created. |
5.
SQL> select * fromexternal_tab; ID -------- -------------------------------------- 0001 0002 |
6.
1)
2)
3)
4)
5)
6)
7)