oracle index

 

Purpose

Use the CREATE INDEX statement to create an index on:

  • One or more columns of a table, a partitioned table, an index-organized table, or a cluster

  • One or more scalar typed object attributes of a table or a cluster

  • A nested table storage table for indexing a nested table column

An index is a schema object that contains an entry for each value that appears in the indexed column(s) of the table or cluster and provides direct, fast access to rows. Oracle Database supports several types of index:

  • Normal indexes. (By default, Oracle Database creates B-tree indexes.)

  • Bitmap indexes, which store rowids associated with a key value as a bitmap

  • Partitioned indexes, which consist of partitions containing an entry for each value that appears in the indexed column(s) of the table

  • Function-based indexes, which are based on expressions. They enable you to construct queries that evaluate the value returned by an expression, which in turn may include built-in or user-defined functions.

  • Domain indexes, which are instances of an application-specific index of type indextype





    ndexes in Oracle are as follows.....
    
    1.Normal index 
        Whenever we created a column(s) with Primary key or 
    Unique constraints ,Oracle implicitly creates Normal 
    index.This index is not Unique index .Why because those 
    columns already having uniqeness because of Unique or 
    Primary key constriants.
    
    2.Bitmap indexs
    3.Function based indexs
    4.Domain indexes.
     if we want to create Unique indexes we have to use Unique 
    keyword when we are creating indexes.
    
    But if you refer Oracle 9i corporation books you can read 
    as follows...
    
     They gave these statement in wrong.
    
    Indexes can be created in two types
    
    1.Unique indexes(Oracle creates it implicitly whenever we 
    created column(s) with PK or Unique constraints
    
    2. Non unique indexes
      This indexes can be created by developers

    
         
         
    We have mainly two different indexes .
    
    Implicit index and Explicit index.
    
    Explicit indexes are again of many types like
    simple index,unique index,Bitmap index,Functional 
    index,Organisational index,cluster index.
     

     

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Oracle SQL中,可以使用INSTR函数来实现类似于indexOf和lastIndexOf的功能。当INSTR函数的第三个参数为1时,它实现的是indexOf功能,即返回字符串中指定子字符串的第一个出现位置的索引。当INSTR函数的第三个参数为-1时,它实现的是lastIndexOf功能,即返回字符串中指定子字符串的最后一个出现位置的索引。 例如,对于字符串'wenjin_文进_李_浩dsf',使用INSTR函数可以得到以下结果: - INSTR('wenjin_文进_李_浩dsf', '_', -1, 1) 返回结果为12,表示'_'在字符串中最后一次出现的位置。 - INSTR('wenjin_文进_李_浩dsf', '_', 1, 1) 返回结果为7,表示'_'在字符串中第一次出现的位置。 所以,INSTR函数可以像indexOf和lastIndexOf一样实现在Oracle SQL中获取字符串中指定子字符串的位置的功能。<span class="em">1</span><span class="em">2</span> #### 引用[.reference_title] - *1* [Oracle SQL中实现indexOf和lastIndexOf功能](https://blog.csdn.net/e_wsq/article/details/41687481)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [Java企业报表管理系统源码](https://download.csdn.net/download/m0_55416028/88269629)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值