ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 关于数据隐式转换是否会用到索引的问题

关于数据隐式转换是否会用到索引的问题

原创 Linux操作系统 作者:cc59 时间:2006-09-14 00:00:00 0 删除 编辑

隐式转换会用到索引吗?


这是在ITPUP上看到的一个帖子.记录一下在哪些隐式转换中ORACLE会使用索引:

The following rules govern the direction in which Oracle makes implicit datatype conversions:
1) During INSERT and UPDATE operations, Oracle converts the value to the datatype of the affected column.
2) During SELECT FROM operations, Oracle converts the data from the column to the type of the target variable.
3) When comparing a character value with a NUMBER value, Oracle converts the character data to NUMBER.
4) When comparing a character value with a DATE value, Oracle converts thecharacter data to DATE.
5) When you use a SQL function or operator with an argument of a datatype other than the one it accepts,
Oracle converts the argument to the accepted datatype.
6) When making assignments, Oracle converts the value on the right side of the equal sign (=) to the datatype of the target of the assignment on the left side.
7) During concatenation operations, Oracle converts from noncharacter datatypes to CHAR or NCHAR.
8) During arithmetic operations on and comparisons between character and noncharacter datatypes,
Oracle converts from any character datatype to a number, date, or rowid, as appropriate.
In arithmetic operations between CHAR/VARCHAR2 and NCHAR/NVARCHAR2, Oracle converts to a number.
9) Comparisons between CHAR/VARCHAR2 and NCHAR/NVARCHAR2 types may entail different character sets.
The default direction of conversion in such cases is from the database character set to the national character set.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/104152/viewspace-139958/,如需转载,请注明出处,否则将追究法律责任。

上一篇: ora-04031
下一篇: ORA-25153错误解决
请登录后发表评论 登录
全部评论

注册时间:2007-12-21

  • 博文量
    132
  • 访问量
    286455