Home > Database > Mysql Tutorial > What is the usage of not in mysql

What is the usage of not in mysql

WBOY
Release: 2021-12-27 10:42:41
Original
6125 people have browsed it

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.

What is the usage of not in mysql

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.

What is the usage of not in mysql

Examples are as follows:

mysql> select not 1;
+-------+
| not 1 |
+-------+
|     0 |
+-------+
mysql> select !0;
+----+
| !0 |
+----+
|  1 |
+----+
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template