Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql is not equal to how symbols are represented.

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How to express that mysql is not equal to symbol? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

Want to confirm that the mysql is not equal to the operator is represented by what symbol, after testing found that mysql and! = are OK, but sqlserver does not recognize! =, so it is recommended to use, this article mainly shares with you how to write the symbol mysql is not equal to, I hope to help you.

Selece * from jb51 where id45

The difference between the symbol "! =" in sql

It is not equal to! =, but it is generally used to code because it works in any SQL, but! = is used in sql2000, it is grammatical error and incompatible

The sum in sql is not equal to,'=','! =',','is null'.....

Not equal to:! =, ~ =, ^ = these four symbols are said to be able to express non-equals in oracle, but after trying, it is found that! =, ^ = is OK, ~ = no, it should be noted that only the standard sql syntax is portable, the rest are oracle platform features, portability is poor, so in development, try to use expression is not equal to

Equal to: = needless to say, but to determine the equality of null, you must use is null or is not null,null can only be judged by is null or is not null, other operators and null operations are false.

For example, select * from bl_ip_dt where amount 800. this statement does not find the record where amount equals null

Select * from bl_ip_dt where amount 800or amount is null is OK MySql's simple query is not equal to NULL

Query the data in the table where aa is null:

Select * from table where aa is null

Query data in the table where aa is not equal to 1:

Select * from table where aa 1

NULL value operation:

The NULL value can be strange until you get used to it. Conceptually, NULL means "no value" or "unknown value", and it is regarded as a different value. To test NULL, you cannot use arithmetic comparison operators such as =, SELECT 1 = NULL, 1 NULL, 1

< NULL, 1 >

NULL

+-+

| | 1 = NULL | 1 NULL | 1 |

< NULL | 1 >

NULL |

+-+

| | NULL | NULL | NULL | NULL | |

+-+

Obviously you can't get meaningful results from these comparisons. Instead, use the IS NULL and IS NOT NULL operators:

Mysql > SELECT 1 IS NULL, 1 IS NOT NULL

+-+ +

| | 1 IS NULL | 1 IS NOT NULL |

+-+ +

| | 0 | 1 |

+-+ +

Note that in MySQL, 0 or NULL means false and other values mean true. The default true value for Boolean operations is 1.

Self-perception is null or IFNULL (SUM (), XXX) is often used in development.

In addition, both! and! = can be used in php.

$a = = $b equals TRUE if $an equals $b.

$a = = $b congruent TRUE, if $an equals $b, and they are of the same type. (introduced by PHP 4)

$a! = $b is not equal to TRUE if $an is not equal to $b.

$a $b is not equal to TRUE if $an is not equal to $b.

$a! = $b non-congruent TRUE, if $an is not equal to $b, or they are of different types. (introduced by PHP 4)

$a

< $b 小与 TRUE,如果 $a 严格小于 $b。 $a >

$b is greater than TRUE if $an is strict $b.

$a = $b greater than or equal to TRUE, if $an is greater than or equal to $b.

Thank you for reading! After reading the above, do you have a general understanding of how mysql is not equal to symbols? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report