Numeric value comparison rules

2024-12-02 03:48:26  Updated

Numeric values are divided into fixed-point numbers, floating-point numbers, and zero. This topic describes the rules for comparing numeric values.

In OceanBase Database, numeric values are compared based on the following rules:

  • Larger values are greater than smaller values. For example, 5.5 > 2.1.

  • Negative values are smaller than zero. For example, -3 < 0;-200 < -1.

  • Positive values are greater than zero. For example, 20 > 0;100 > 1.

For more information about value comparison rules, see Precedence of numeric data types.

Contact Us