COMPARE_DECFLOAT()
Compares two DECFLOAT values to be equal, different or unordered
SMALLINT
COMPARE_DECFLOAT (decfloat1, decfloat2)
| Parameter | Description |
|---|---|
decfloatn |
Value or expression of type |
The result is a SMALLINT value, as follows:
0
|
Values are equal |
1
|
First value is less than second |
2
|
First value is greater than second |
3
|
Values are unordered, i.e. one or both is |
Unlike the comparison operators (‘<’, ‘=’, ‘>’, etc.), comparison is exact: COMPARE_DECFLOAT(2.17, 2.170) returns 2 not 0.