NUMBER type conversion rules
The storage format of the NUMBER type in seekdb is the same, but it can be divided into four formats based on the value domain definition, as shown in the following table.
| Storage type | Default storage rules in seekdb |
|---|---|
Fixed-point number DECIMAL(M,D) = {10^{-D}*i | i = 0,1,...,10^M-1} where M is a natural number and D is an integer |
|
| Unsigned fixed-point number DECIMAL(M,D) |
|
| Floating-point number | Not supported |
The conversion rules between all NUMBER types in seekdb are as follows. The "-" in the table indicates that the conversion is not supported across compatibility modes.
tip
Unsigned fixed-point numbers exist only in seekdb.
| Instant conversion allowed (From\To) | Fixed-point number(M2,D2) | Unsigned fixed-point number(M2,D2) | Floating-point number |
|---|---|---|---|
| Fixed-point number(M1,D1) | Conversion condition: D1 <= D2 and M1-D1 <= M2-D2 | Not supported | Conversion condition: M-D <= 38 |
| Unsigned fixed-point number(M1,D1) UNSIGNED | Conversion condition: D1 <= D2 and M1-D1 <= M2-D2 | Conversion condition: D1 <= D2 and M1-D1 <= M2-D2 | - |
| Floating-point number | Not supported | - | Supported |