This topic describes the compatibility of OceanBase Database in Oracle mode with native Oracle Database in terms of SQL data types.
Oracle Database supports 24 data types and OceanBase Database supports 20 of them. The following table lists the data types.
| No. | Oracle data type | Supported in OceanBase Database |
|---|---|---|
| 1 | CHAR(size) | Yes |
| 2 | NCHAR[(size)] | Yes |
| 3 | VARCHAR2(size) | Yes |
| 4 | VARCHAR(size) | Yes |
| 5 | NVARCHAR2(size) | Yes |
| 6 | NUMBER [ (p [, s]) ] | Yes |
| 7 | FLOAT [(p)] | Yes |
| 8 | BINARY_FLOAT | Yes |
| 9 | BINARY_DOUBLE | Yes |
| 10 | LONG (deprecated type in Oracle Database) | No |
| 11 | DATE | Yes |
| 12 | TIMESTAMP [(fractional_seconds_precision)] | Yes |
| 13 | TIMESTAMP [(fractional_seconds_precision)] WITH TIME ZONE | Yes |
| 14 | TIMESTAMP [(fractional_seconds_precision)] WITH LOCAL TIME ZONE | Yes |
| 15 | INTERVAL YEAR [(year_precision)] TO MONTH | Yes |
| 16 | INTERVAL DAY [(day_precision)] TO SECOND [(fractional_seconds_precision)] | Yes |
| 17 | RAW(size) | Yes |
| 18 | LONG RAW (deprecated type in Oracle Database) | No |
| 19 | ROWID | Yes |
| 20 | UROWID [(size)] | Yes |
| 21 | BFILE | No |
| 22 | BLOB | Yes |
| 23 | CLOB | Yes |
| 24 | NCLOB | No |