Home > Database > Mysql Tutorial > How to express not equal in mysql

How to express not equal in mysql

WBOY
Release: 2022-03-09 16:06:02
Original
33726 people have browsed it

In mysql, inequality can be expressed by "" or "!=", but generally "" is used to express inequality because " "Works in any SQL, is highly portable, and has fast query speeds.

How to express not equal in mysql

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

How to express not equal in mysql

The judgment symbol is commonly used in MySQL, and not equal is a more commonly used symbol. Let’s explain the following three not equal symbols

## The earliest usage of not equal, the portability is better than the following two !=Later added to MySQL, similar to not equal in programming languages ​​​​such as Java not inAdd data after not in to indicate that it is not in the data
Symbol Meaning

It is recommended to use in MySQL to indicate not equal to . Why? Because has strong portability and because the query speed is fast. There is a question on leetcode, which is a query question for movie theaters. The question is as follows:

How to express not equal in mysql

is actually very simple. If the query description is non-boring and the id is non-even, use the query results to order Just sort by by, but when querying description and non-boring, you need to use inequality to judge. The following is the comparison of query times using three types of inequality


How to express not equal in mysql You can see to express not equal

Recommended learning:

mysql video tutorial

The above is the detailed content of How to express not equal 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