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
| Name | Storage size | Description |
|---|---|---|
| BOOLEAN | 1 byte | Logical 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.
| State | Valid value |
|---|---|
| TRUE | TRUE |
| FALSE | FALSE |
| UNKNOWN | NULL |
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.
该文章对您有帮助吗?