In mysql, not is used to determine whether an expression is true or false. It is a logical operator in mysql. The syntax is "select not expression". If the expression is true, the result returns 1. If the expression If the formula is false, the result is 0.
The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.
What is the usage of not in mysql
not is a logical operator in mysql
Logical operators are used to determine whether an expression is true or false. If the expression is true, the result is 1. If the expression is false, the result is 0.
Usually used to detect whether a database object exists.
Examples are as follows:
mysql> select not 1; +-------+ | not 1 | +-------+ | 0 | +-------+ mysql> select !0; +----+ | !0 | +----+ | 1 | +----+
Recommended learning: mysql video tutorial
The above is the detailed content of What is the usage of not in mysql. For more information, please follow other related articles on the PHP Chinese website!