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
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