GTEQ()

Overview

Returns a boolean indicating if one value is greater or equal to than another.

USAGE

GTEQ(value, value)

Argument Name

Description

value

The two values to compare

DETAILS

GTEQ() is a function that checks if the first argument is greater than or equal to the second argument and returns 1 (true) or 0 (false).

If at least one value is a number, a numeric comparison is performed. Thus, a string value is converted into a number when paired with a numeric value.

When both values are strings, the comparison takes into account the current sort order, which might treat uppercase and lowercase letters as equivalent.

A NULL is returned if either argument is NULL.

The function call GTEQ(x, y) behaves in exactly the same manner as the conditional expression x >= y.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT GTEQ(99, 123), GTEQ(PI(), 3);
+---------------+---------------+
| GTEQ(99, 123) | GTEQ(PI(), 3) |
+---------------+---------------+
|             0 |             1 |
+---------------+---------------+
-- Disable strict mode or the select might throw an error
SET sql_mode = '';
SELECT GTEQ(99, '99a'), GTEQ('99', '99a');
+-----------------+-------------------+
| GTEQ(99, '99a') | GTEQ('99', '99a') |
+-----------------+-------------------+
|               1 |                 0 |
+-----------------+-------------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES