Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Basic Conditional Expressions

A conditional expression is an expression that is included in the WHERE clause of the SELECT, UPDATE and DELETE statements, and in the HAVING clause of the SELECT statement. There are simple comparison, ANY/SOME/ALL, BETWEEN, EXISTS, IN/NOT IN, LIKE and IS NULL conditional expressions, depending on the kinds of the operators combined.

A simple comparison conditional expression compares two comparable data values. Expressions or subqueries are specified as operands, and the conditional expression always returns NULL if one of the operands is NULL. The following table shows operators that can be used in the simple comparison conditional expressions. For details, see Comparison Operator.

Operators for Conditional Expressions

Comparison Operator

Description

Conditional Expression

Return Value

=

A value of left operand is the same as that of right operand.

1=2

0

<>, !=

A value of left operand is not the same as that of right operand.

1<>2

1

>

A value of left operand is greater than that of right operand.

1>2

0

<

A value of left operand is less than that of right operand.

1<2

1

>=

A value of left operand is equal to or greater than that of right operand.

1>=2

0

<=

A value of left operand is equal to or less than that of right operand.

1<=2

1