tencent cloud

Stream Compute Service

Releases Notes and Announcements
Release Notes
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Billing Mode
Refund
Configuration Adjustments
Getting Started
Preparations
Creating a Private Cluster
Creating a SQL Job
Creating a JAR Job
Creating an ETL Job
Creating a Python Job
Operation Guide
Managing Jobs
Developing Jobs
Monitoring Jobs
Job Logs
Events and Diagnosis
Managing Metadata
Managing Checkpoints
Tuning Jobs
Managing Dependencies
Managing Clusters
Managing Permissions
SQL Developer Guide
Overview
Glossary and Data Types
DDL Statements
DML Statements
Merging MySQL CDC Sources
Connectors
SET Statement
Operators and Built-in Functions
Identifiers and Reserved Words
Python Developer Guide
ETL Developer Guide
Overview
Glossary
Connectors
FAQ
Contact Us

Comparison Functions

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2023-11-08 14:21:14
Comparison functions are described as follows:
Function
Description
value1 = value2
Returns TRUE if value1 is equal to value2 and FALSE otherwise.
Returns NULL if value1 or value2 is NULL. In WHERE conditions, NULL is treated as FALSE. Therefore, it is recommended to use IS NULL instead of = NULL when comparing a value with NULL.
The difference between = and IS NOT DISTINCT FROM lies in how they handle NULL values.
value1 <> value2
Returns TRUE if value1 is not equal to value2; otherwise FALSE.
value1 > value2
Returns TRUE if value1 is greater than value2; otherwise FALSE.
value1 >= value2
Returns TRUE if value1 is greater than or equal to value2; otherwise FALSE.
value1 < value2
Returns TRUE if value1 is less than value2; otherwise FALSE.
value1 <= value2
Returns TRUE if value1 is less than or equal to value2; otherwise FALSE.
value IS NULL
Returns TRUE if value is NULL; otherwise FALSE.
value IS NOT NULL
Returns TRUE if value is not NULL; otherwise FALSE.
value1 IS DISTINCT FROM value2
Returns TRUE if two values are different; otherwise FALSE. NULL values are treated as identical.
value1 IS NOT DISTINCT FROM value2
Returns TRUE if two values are equal; otherwise FALSE. NULL values are treated as identical.
value1 BETWEEN [ ASYMMETRIC | SYMMETRIC ] value2 AND value3
Returns TRUE if value1 is greater than or equal to value2 and less than or equal to value3; otherwise FALSE.

[ ] represents an optional parameter. The default value is ASYMMETRIC. When the SYMMETRIC keyword is explicitly declared, the values of value2 and value3 can be interchanged without affecting the result.
value1 NOT BETWEEN [ ASYMMETRIC | SYMMETRIC ] value2 AND value3
Returns TRUE if value1 is less than value2 or greater than value3; otherwise FALSE.

[ ] represents an optional parameter. The default value is ASYMMETRIC. When the SYMMETRIC keyword is explicitly declared, the values of value2 and value3 can be interchanged without affecting the result.
string1 LIKE string2
Returns TRUE if string1 matches pattern string2; otherwise FALSE.
string1 NOT LIKE string2
Returns TRUE if string1 does not match pattern string2; otherwise FALSE.
string1 SIMILAR TO string2
Returns TRUE if string1 matches regular expression string2; otherwise FALSE.
string1 NOT SIMILAR TO string2
Returns TRUE if string1 does not match regular expression string2; otherwise FALSE.
value IN (listItem [, listItem]* )
Returns TRUE if value exists in the given list. This statement is equivalent to connecting multiple OR expressions.
When the list contains NULL, returns NULL if value cannot be found and FALSE otherwise.
Always returns NULL if value is NULL.
value NOT IN (listItem, [, listItem]*)
Returns TRUE if value does not exist in the given list; otherwise FALSE.
EXISTS (sub-query)
Returns TRUE if sub-query returns at least one row; otherwise FALSE.
This query can cause memory pressure.
value IN (sub-query)
Returns TRUE if value is equal to a row returned by sub-query.
This query can cause memory pressure.
value NOT IN (sub-query)
Returns TRUE if value is not equal to a row returned by sub-query.
This query can cause memory pressure.


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백