96.Which two operations can be performed on an external table? (Choose two.) A.Create a view on the

96.Which two operations can be performed on an external table? (Choose two.)
A.Create a view on the table.
B.Create an index on the table.
C.Create a synonym on the table.
D.Add a virtual column to the table.
E.Update the table using the UPDATE statement.
F.Delete rows in the table using the DELETE command.
答案:AC
由于外部表,是外部的文件,所以只能进行select,不可以进行delete和update
--我们每个选项测试一下
1.首先查看当前哪个是外部表
SQL> select TABLE_NAME from user_external_tables;


TABLE_NAME
------------------------------
TEST_DELTA


SQL> desc TEST_DELTA ;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ID                                                 VARCHAR2(100)
SQL> select * from test_delta;
ID
--------------------------------------------------------------------------------
1
2
3
4
5
6
7
8
8 rows selected.
SQL> 
2.测试创建一个视图(A选项正确)
SQL> create view v_test as select * from test_delta;
View created.
3.测试创建一个索引(B选项错误)
SQL> create index i_text on test_delta(id);
create index i_text on test_delta(id)                       *
ERROR at line 1:
ORA-30657: operation not supported on external organized table
4.测试一个同义词(C选项正确)
SQL> create synonym s_test for test_delta;
Synonym created.
5.测试虚拟列(D选项错误)
SQL> alter table test_delta add(id2 as (id*2));
alter table test_delta add(id2 as (id*2))
*
ERROR at line 1:
ORA-30657: operation not supported on external organized table
6.测试update(E选项错误)
SQL> update test_delta set id=10; 
update test_delta set id=10
       *
ERROR at line 1:
ORA-30657: operation not supported on external organized table
7.测试delete(F选项错误)
SQL> delete  from test_delta;
delete  from test_delta
             *
ERROR at line 1:
ORA-30657: operation not supported on external organized table
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值