1024programmer Mysql Mysql judges whether the field is null

Mysql judges whether the field is null

Mysql method to determine whether it is null: 1. Use the syntax “WHERE filed IS NULL” to query whether the field is empty; 2. Use the syntax “WHERE field IS NOT NULL” to query whether the field is not empty NULL.

Recommendation: “Mysql Video Tutorial”

MySQL judges whether the field is NULL

Problem

When using the MySQL database to determine whether the value of a field is NULL:

There is an exception when using field == NULL

Using field != NULL Exception

Solution

MySQL query field is empty NULL syntax

  WHERE filed IS NULL

MySQL query field is not empty NULL syntax

WHERE field IS NOT NULL

The above is the detailed content of mysql judging whether the field is null. For more information, please pay attention to other related articles on 1024programmer.com!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/mysql-judges-whether-the-field-is-null/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索