tencent cloud

TencentDB for MySQL

Description of Supported Logical Operations

Download
Focus Mode
Font Size
Last updated: 2025-05-09 11:51:18
The read-only analysis engine currently supports most MySQL logical operations, but there are still limitations and incompatibilities in some scenarios. This document introduces the support for logical operations in the read-only analysis engine and lists the type limitations in input parameters. Input parameters and usage methods not mentioned in the document are not supported.

Supported Logical Operations

and Operation

Syntax: op1 and op2
Supported value types for op1: Only the bool data type is supported.
Supported value types for op2: Only the bool data type is supported.

or Operation

Syntax: op1 or op2
Supported value types for op1: Only the bool data type is supported.
Supported value types for op2: Only the bool data type is supported.

not Operation

Syntax: not op1
Supported value types for op1: Only the bool data type is supported.

case Operation

Syntax: case when search_condition then statement_list else statement_list end
Supported value types for search_condition: Only the bool data type is supported.
Supported value types for statement_list: int, bigint, double, decimal, varchar, and char.

if Operation

Syntax: if(expr1,expr2,expr3)
Supported value types for expr1: Only the bool data type is supported.
Supported value types for expr2: int, bigint, double, decimal, varchar, and char.
Supported value types for expr3: int, bigint, double, decimal, varchar, and char.

ifnull Operation

Syntax: ifnull(expr1, expr2)
Supported value types for expr1: int, bigint, double, decimal, varchar, and char.
Supported value types for expr2: int, bigint, double, decimal, varchar, and char.

isnull Operation

Syntax: isnull(expr1)
Supported value types for expr1: int, bigint, double, decimal, varchar, and char.

in Operation

Syntax: expr IN (value,...)
Supported value types for expr: int, bigint, double, decimal, varchar, and char.
Supported value types for value: int, bigint, double, decimal, varchar, and char.
Note:
In scenarios with multiple value values, the value should be a constant and cannot be a variable or field name. For example, it can only be used in the format of column in ('1','2','3') rather than columnA in (columnB,varA).
Syntax: expr IN (sub_query)
Supported value types for expr: int, bigint, double, decimal, varchar, and char.
Supported value types for sub_query: Subquery and single field.

like Operation

Syntax: expr like pattern
Supported value types for expr: int, bigint, double, decimal, varchar, and char.
Supported value types for pattern: int, bigint, double, decimal, varchar, and char.
Note:
The pattern only supports constants and does not support the substitution of variables or field names.

Coalescence Operation

Syntax: coalesce(value,...)
Supported value types for value: int, bigint, double, decimal, varchar, and char.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback