37.You issued the following command to drop the PRODUCTS table:
SQL> DROP TABLE products;
What is the implication of this command? (Choose all that apply.)
A:All data along with the table structure is deleted.
B:The pending transaction in the session is committed.
C:All indexes on the table will remain but they are invalidated.
D:All views and synonyms will remain but they are invalidated.
E:All data in the table are deleted but the table structure will remain.
答案:ABD
解析:题目说的是删除语句有和影响
A:正确,数据和数据结构都会删除
B:正确,之前没有提交的事务都会提交,提交事务的语句ddl(比如:create,alter,drop,rename,truncate)
,dcl(grant,revoke),tc(commit,rollback,savepoint除外)
C:错误,表上的索引将会被删除
D:正确,所有的视图和同义词将保持但是无效
E:错误,表中所有的数据被删除,表结构也会被删除
SQL> DROP TABLE products;
What is the implication of this command? (Choose all that apply.)
A:All data along with the table structure is deleted.
B:The pending transaction in the session is committed.
C:All indexes on the table will remain but they are invalidated.
D:All views and synonyms will remain but they are invalidated.
E:All data in the table are deleted but the table structure will remain.
答案:ABD
解析:题目说的是删除语句有和影响
A:正确,数据和数据结构都会删除
B:正确,之前没有提交的事务都会提交,提交事务的语句ddl(比如:create,alter,drop,rename,truncate)
,dcl(grant,revoke),tc(commit,rollback,savepoint除外)
C:错误,表上的索引将会被删除
SQL> create table test(t varchar2(10));
Table created.
SQL> create index i_test_t on test(t);
Index created.
SQL> select index_name,table_name,table_type from user_indexes where table_name ='TEST';
INDEX_NAME TABLE_NAME TABLE_TYPE
------------------------------ ------------------------------ -----------
I_TEST_T TEST TABLE
SQL> drop table test;
Table dropped.
SQL> select index_name,table_name,table_type from user_indexes where table_name ='TEST';
no rows selected
SQL>
D:正确,所有的视图和同义词将保持但是无效
E:错误,表中所有的数据被删除,表结构也会被删除