The as follows: First, there is a table named business: SELECT ISNULL(business_name,'no business_name') AS bus_isnull FROM business WHERE id=2 Running it directly will give an error: Error code: 1582 Incorrect parameter count in the call to native function 'isnull' Therefore, the Use SELECT IFNULL(business_name,'no business_name') AS bus_ifnull FROM business WHERE id=2 Running results: When the queried value is not null: SELECT IFNULL(business_name,'no business_name') AS bus_ifnull FROM business WHERE id=1 The results are as follows: Use SELECT COALESCE(business_name,'no business_name') AS bus_coalesce FROM business WHERE id=2 The results are as follows: When the query value is not null: SELECT COALESCE(business_name,'no business_name') AS bus_coalesce FROM business WHERE id=1 Among them: SELECT COALESCE(business_name,district_id,id) AS bus_coalesce FROM business WHERE id=2 So, how to use SELECT * FROM business WHERE ISNULL(business_name) The results are as follows: Similarly, SELECT * FROM business WHERE business_name IS NULL The results are as follows: SELECT * FROM business WHERE business_name IS NOT NULL Summarize The above is the full content of this article. I hope that the content of this article can bring some help to your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: How to use file writing to debug a Linux application
>>: Complete code for implementing the popular astronaut watch face based on JavaScript
First of all, we need to know what a state manage...
Overview There are many form requirements in the ...
Table of contents Create a table View the databas...
First, let's take a look at the relative leng...
This article shares the specific code for JavaScr...
<br />I have written two articles before, &q...
1. Write a split script (splitNginxLog.sh) * Beca...
This article example shares the specific code of ...
In the Linux system, there is a kind of file call...
The methods and concepts of private filters and g...
To improve the performance of web pages, many dev...
Since we are going to upload pictures, the first ...
This article shares with you how to use Navicat t...
Mirroring is also one of the core components of D...
<br />Related article: Analysis of Facebook&...