[20141009]oracle資料型別內部編碼.txt

lfree發表於2014-10-09

[20141009]oracle資料型別內部編碼.txt

--瞭解一些oracle內部資料型別的內部編碼

SCOTT@test> select distinct type# from sys.col$ order by 1;
  TYPE#
-------
      0
      1
      2
      8
     12
     23
     24
     25
     29
     58
     69
     96
    101
    105
    111
    112
    113
    114
    121
    122
    123
    180
    181
    182
    183
    208
    231
27 rows selected.

--查詢找到如下連結:
http://arjudba.blogspot.com/2009/03/oracle-datatype-internal-code.html

Datatype                                                                      Code
--------------------------------------                                        -------
1. VARCHAR2(size [BYTE | CHAR])                                               01
2. NVARCHAR2(size)                                                            01
3. NUMBER[(precision [, scale]])                                              02
4. LONG                                                                       08
5. DATE                                                                       12
6. BINARY_FLOAT                                                               21
7. BINARY_DOUBLE                                                              22
8. RAW(size)                                                                  23
9. LONG RAW                                                                   24
10.ROWID                                                                      69
11.CHAR [(size [BYTE | CHAR])]                                                96
12.NCHAR[(size)]                                                              96
13.CLOB                                                                       112
14.NCLOB                                                                      112
15.BLOB                                                                       113
16.BFILE                                                                      114
17.TIMESTAMP [(fractional_seconds)]                                           180
18.TIMESTAMP [(fractional_seconds)] WITH TIME ZONE                            181
19.INTERVAL YEAR [(year_precision)] TO MONTH                                  182
20.INTERVAL DAY [(day_precision)] TO SECOND [(fractional_seconds)]            183
21.UROWID [(size)]                                                            208
22.TIMESTAMP [(fractional_seconds)] WITH LOCAL TIME ZONE                      231

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1292597/,如需轉載,請註明出處,否則將追究法律責任。

相關文章