This means that the Index Type is Function-Based Index
解决方案 »
- 一个Oracle SQL语句,调试总是报错,哪位大侠帮我解决下~谢谢
- 求~消除冗余行的方法
- 急```如何从游标中将整条数据取出并插入一个表中?
- 一个小问题,请大家帮忙
- excel导入数据库,好像不简单.....
- 请教我写最简单的过程!谢谢!
- 数据导出工作执行失败(我是新手,大家帮帮忙,给分。在线等)
- 在我安装server端后,实例oral 表空间ttdata 使用net8 config.. 指定service 出现问题,怎么也联不上啊!!!
- date形数据的格式是什么
- 在linux72下安装oracle9i,停留在init java virtual machine,求救
- 这一条记录不知道怎么写查询语句。大家帮帮忙,在线给分!!
- 请问Oracle 里面有没有Left函数
能不能说详细一点,有什么办法可以解决? 谢谢。
其中columnName上以前是否已经建过主键或唯一键约束了?
如果是的话,这两种约束会建索引,默认的索引名会和约束名一样,当然
如果建约束时没有起名字,oracle会起个系统的名字,默认以sys打头
1、SQL> Select index_owner, COLUMN_NAME from dba_ind_columns where rownum<5;INDEX_OWNER COLUMN_NAME
------------------------------ ------------------------------ --------------------
SYS OBJ#
SYS FILE#
SYS TS#
SYS RELFILE#
2、SQL> Select INDEX_NAME, TABLE_NAME,COLUMN_NAME from user_ind_columns where rownum<5;INDEX_NAME TABLE_NAME COLUMN_NAME
------------------------------ ------------------------------ --------------------
PK_NET_CORPMEMBER_LIST NET_CORPMEMBER_LIST ID
PK_T_BBS_CONTENT_ID T_BBS_CONTENT ID
PK_T_BBS_ITEM_ID T_BBS_ITEM ID
PK_T_DIC T_DIC ID
Use ASC or DESC to indicate whether the index should be created in ascending or
descending order. Indexes on character data are created in ascending or descending
order of the character values in the database character set.
Oracle treats descending indexes as if they were function-based indexes. You do not
need the QUERY REWRITE or GLOBAL QUERY REWRITE privileges to create them, as
you do with other function-based indexes. However, as with other function-based
indexes, Oracle does not use descending indexes until you first analyze the index
and the table on which the index is defined. See the column_expression clause
of this statement.
Restriction on ASC and DESC: You cannot specify either of these clauses for a
domain index. You cannot specify DESC for a reverse index. Oracle ignores DESC if
index is bitmapped or if the COMPATIBLE initialization parameter is set to a value
less than 8.1.0. 仔细以上内容吧
也就是说,select * from dba_ind_columns是没有问题的,
如果select * from user_ind_cloumns这样取也是没有问题,这并不矛盾,不知你是否能明白?
INDEX_NAME可能会出现系统给提供的索引名【以SYS打头】,
不过COLUMN_NAME应该就是泥建索引的字段名;估计,泥可能把试图中的INDEX_NAME和COLUMN_NAME混淆了?
------------------------------ --------------------------- ------------------------------
INX_T1 FUNCTION-BASED NORMAL T
INX_T2 FUNCTION-BASED NORMAL T
INX_T3 FUNCTION-BASED NORMAL T
INX_T4 FUNCTION-BASED NORMAL T SQL> select index_name,table_name,column_name from user_ind_columns where index_name like 'INX_T%'; INDEX_NAME TABLE_NAME COLUMN_NAME
------------------------------ ------------------------------ ----------------------------
INX_T1 T SYS_NC00003$
INX_T2 T SYS_NC00003$
INX_T2 T B
INX_T3 T SYS_NC00004$
INX_T4 T SYS_NC00005$ 可以看到,desc的索引,oracle是当成函数索引来处理的。
inx_t4 与前面的索引一样