oracle 删除INDEX是否会删除TABLE?在SQLPLUS中

k5ifujac  于 2023-01-20  发布在  Oracle
关注(0)|答案(1)|浏览(157)

如果在SQLPLS中触发查询,则删除索引ord_customer_ix_demo;
此语句删除名为ord_customer_ix_demo的索引,该索引是在“压缩索引:示例”:
这个也会把我的table掉下来吗?
我在SQLPLS删除索引ord_customer_ix_demo中发出了一个查询;
此语句删除名为ord_customer_ix_demo的索引,该索引是在“压缩索引:示例”:
我想知道这会不会把我的table也弄倒?

ix0qys7i

ix0qys7i1#

不,它不会掉table的。
样表:

  1. SQL> create table demo as select level id from dual connect by level <= 5;
  2. Table created.

该表上的索引:

  1. SQL> create index ord_ix_demo on demo (id);
  2. Index created.

表格内容:

  1. SQL> select * from demo;
  2. ID
  3. ----------
  4. 1
  5. 2
  6. 3
  7. 4
  8. 5

删除索引:

  1. SQL> drop index ord_ix_demo;
  2. Index dropped.

table还在吗?是的

  1. SQL> select * from demo;
  2. ID
  3. ----------
  4. 1
  5. 2
  6. 3
  7. 4
  8. 5
  9. SQL>
展开查看全部

相关问题