Updated on 2024-12-06 GMT+08:00

Flow Control Functions

Table 1 Flow control functions

No.

MySQL

GaussDB

Difference

1

IF()

Supported.

If the first parameter is TRUE and the third parameter expression contains an implicit type conversion error, or if the first parameter is FALSE and the second parameter expression contains an implicit type conversion error, MySQL ignores the error while GaussDB displays a type conversion error.

2

IFNULL()

Supported.

If the first parameter is not NULL and the expression of the second parameter contains an implicit type conversion error, MySQL ignores the error while GaussDB displays a type conversion error.

3

NULLIF()

Supported, with differences.

The return value type of a function differs in MySQL 5.7 and MySQL 8.0. Return types are compatible with MySQL 8.0 because it is more appropriate.