Operators
Bitwise Operators
Set Operators
Set operators combine the results of two queries. Queries that include set operators are known as compound queries. The expressions corresponding to each query in the select list in a compound query must match in number. The results returned take the data type of the first query, and the data type returned by subsequent queries must be convertible into the data type of the first query. The conditions of the CAST
function apply to this conversion.
LIKE is used together with wildcards to match strings. Its usage is described as follows:
- ‘%’ matches 0 or any number of characters, ‘_‘ matches any single ASCII character.
- The maximum length of wildcard string is 100 bytes. A very long wildcard string may slowdown the execution performance of operator.
- Use POSIX regular expression syntax. For more information, see Regular Expressions.
- Regular expression can be used against only table names, i.e.
tbname
, and tags of binary/nchar types, but can’t be used against data columns.
Logical Operators
TDengine performs short-path optimization when calculating logical conditions. If the first condition for AND is false, FALSE is returned without calculating the second condition. If the first condition for OR is true, TRUE is returned without calculating the second condition