tencent cloud

All product documents
TDSQL-C for MySQL
Description of Supported Logical Operations
Last updated: 2025-01-09 14:18:10
Description of Supported Logical Operations
Last updated: 2025-01-09 14:18:10
Currently, the read-only analysis engine supports most of MySQL's logical operations, but there are still limitations and incompatibilities in certain scenarios. This document introduces supported logical operations in the read-only analysis engine, and enumerates type restrictions on input parameters. Input parameters and usage methods not mentioned in the document are not supported.

Supported Types of Logical Operations

and Operation

Syntax: op1 and op2 Supported value types for op1: bool only. Supported value types for op2: bool only.

or Operation

Syntax: op1 or op2 Supported value types for op1: bool only. Supported value types for op2: bool only.

not Operation

Syntax: not op1 Supported value types for op1: bool only.

case Operation

Syntax: case when search_condition then statement_list else statement_list end Supported value types for search_condition: bool only. 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: bool only. 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 the scenario of multiple values, each value can only be a constant instead of a variable or a field name. For example, columnA in (columnB, varA) can only be like column in ('1', '2', '3').
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:
pattern only supports constants instead of variables or field names.

coalesce Operation

Syntax: coalesce(value,...) Supported value types for value: int, bigint, double, decimal, varchar, and char.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon