Boolean type

更新时间:
复制 MD 格式

PolarDB for Oracle supports the standard SQL BOOLEAN type for storing logical true/false values. BOOLEAN can hold one of three states: TRUE, FALSE, or NULL (representing an unknown state).

Type reference

NameStorage sizeDescription
BOOLEAN1 byteLogical Boolean (true/false)

Accepted input values

Note
  • The valid value for representing the true state is TRUE.
  • The valid value for representing the false state is FALSE.
StateValid value
TRUETRUE
FALSEFALSE
UNKNOWNNULL

Handle the unknown state

When a BOOLEAN column allows NULL, the value represents an unknown state. Use IS NULL or IS NOT NULL to check for it — not = NULL, which never matches.