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 | 

Logical Operators

Description

For the logical operator, predicates are always specified as the operand. TRUE, FALSE or NULL is returned as the result of the operation. The following table shows the logic operators supported by CUBRID.

Logical Operators Supported by CUBRID

Logical Operator

Description

Condition

AND, &&

If all operands are TRUE, it returns TRUE.

a AND b

OR, ||

If none of operands is NULL and one or more operand is TRUE, it returns TRUE. If pipes_as_concat is no that is a parameter related to SQL statements, a double pipe symbol can be used as OR operator.

a OR b

XOR

If none of operand is NULL and each of operand has a different value, it returns TRUE.

a XOR b

NOT, !

A unary operator. If a operand is FALSE, it returns TRUE. If it is TRUE, returns FALSE.

NOT a

True Table of Logical Operators

a

b

a AND b

a OR b

NOT a

a XOR b

TRUE

TRUE

TRUE

TRUE

FALSE

FALSE

TRUE

FALSE

FALSE

TRUE

FALSE

TRUE

TRUE

NULL

NULL

TRUE

FALSE

NULL

FALSE

FALSE

FALSE

FALSE

TRUE

FALSE

FALSE

NULL

FALSE

NULL

TRUE

NULL