【问题标题】:Select all indexes of a type in Oracle在Oracle中选择一个类型的所有索引
【发布时间】:2013-04-12 23:20:53
【问题描述】:

如何在 Oracle 10g 中选择特定类型的所有索引,例如,我想要声明的所有 bitmap 索引。

我想查询会是这样的:

select * from system_indexes where type = 'bitmap'

但这绝对是不正确的。

【问题讨论】:

    标签: sql oracle indexing oracle10g


    【解决方案1】:
    SELECT *
      FROM dba_indexes
     WHERE index_type IN ('BITMAP', 'FUNCTION-BASED BITMAP' )
    

    可能是您要查找的内容(尽管您可能只需要index_type = 'BITMAP' 所在的索引。如果您只关心拥有SELECT 访问权限的表上的索引,则可以查询all_indexes 而不是dba_indexes。如果只关心当前schema中的索引,可以查询user_indexes而不是dba_indexes

    【讨论】:

      猜你喜欢
      • 2023-03-04
      • 2018-10-01
      • 2014-11-14
      • 1970-01-01
      • 2011-01-28
      • 2012-02-15
      • 1970-01-01
      • 2020-12-24
      • 1970-01-01
      相关资源
      最近更新 更多