Os operadores lógicos AND, OR e NOT.
O ESQL fornece os seguintes operadores lógicos:
Os valores NULL e UNKNOWN são tratados como valores especiais por esses operadores. Os princípios são:
O resultado das operações AND e OR está definido pela tabela a seguir.
| Valor de P | Valor de Q | Resultado de P AND Q | Resultado de P OR Q |
|---|---|---|---|
| TRUE | TRUE | TRUE | TRUE |
| TRUE | FALSE | FALSE | TRUE |
| TRUE | UNKNOWN | UNKNOWN | TRUE |
| FALSE | TRUE | FALSE | TRUE |
| FALSE | FALSE | FALSE | FALSE |
| FALSE | UNKNOWN | FALSE | UNKNOWN |
| UNKNOWN | TRUE | UNKNOWN | TRUE |
| UNKNOWN | FALSE | FALSE | UNKNOWN |
| UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN |
O resultado das operações NOT está definido pela tabela a seguir.
| Operando | Resultado de NOT |
|---|---|
| TRUE | FALSE |
| FALSE | TRUE |
| UNKNOWN | UNKNOWN |