top of page
CerebroSQL

MySQL: 

!

Syntax:
NOT, !

Logical NOT. Evaluates to 1 if the operand is 0, to 0 if the operand is
nonzero, and NOT NULL returns NULL.

Example

mysql> SELECT NOT 10;
-> 0
mysql> SELECT NOT 0;
-> 1
mysql> SELECT NOT NULL;
-> NULL
mysql> SELECT ! (1+1);
-> 0
mysql> SELECT ! 1+1;
-> 1

bottom of page