Oracle Compatibility for Datalake tables
Db2 provides features that enable applications that were written for an Oracle database to use a Db2 database without having to be rewritten.
For more information, see Oracle Compatibility. The Oracle compatibility features also apply to Datalake tables with the exception of the handling of the NUMBER data type.
NUMBER:
The NUMBER data type supports applications that use the Oracle NUMBER data type.
EFFECT:
When the NUMBER data type is explicitly encountered in SQL statements, the data type is
implicitly mapped as follows:
- If you specify NUMBER without precision and scale attributes, it is mapped to DECIMAL(31,0).
Note: This is different from the handling of Db2 local tables where this is mapped to DECFLOAT(16).
- If you specify NUMBER(p), it is mapped to DECIMAL(p).
- If you specify NUMBER(p,s), it is mapped to DECIMAL(p,s).
The maximum supported precision is 31, and the scale must be a positive value that is no greater than the precision.