37.You issued the following command to drop the PRODUCTS table:

本文详细解释了SQL中DROP TABLE命令的影响,包括数据及表结构的删除、事务的自动提交、索引与视图的失效等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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:错误,表上的索引将会被删除
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:错误,表中所有的数据被删除,表结构也会被删除
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值