Condividi tramite


is false operatore

Si applica a:segno di spunta sì Databricks SQL segno di spunta sì Databricks Runtime

Verifica se expr è false.

Sintassi

expr is [not] false

Argomenti

  • expr: una espressione BOOLEAN o STRING.

Valori restituiti

Un BOOLEAN.

Se expr è una STRINGA non sensibile alle maiuscole/minuscole di valore 't', 'true', 'y', 'yes' o '1', viene interpretata come un BOOLEANO true. Se i valori sono 'f', 'false''n', 'no', o '0' viene interpretato come valore BOOLEANfalse.

Se expr è NULL il risultato è false.

Se not viene specificato questo operatore restituisce true se expr è false o NULL e in false caso contrario.

Se not non viene specificato, l'operatore restituisce true se expr è true e false in caso contrario.

Esempi

> SELECT true is false;
 false

> SELECT 'f' is false;
 true

> SELECT false is false;
 true

> SELECT NULL is false;
 false

> SELECT 'invalid' is false;
 Error: CAST_INVALID_INPUT

> SELECT false is not false;
 false

> SELECT 'f' is not false;
 false

> SELECT true is not false;
 true

> SELECT NULL is not false;
 true