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
sort Sort the contents of a text file Usage: sort...
Absolute, relative and fixed in position position...
In the development environment, the vue project i...
The blogger said : I have been writing a series o...
This article mainly introduces the solution to th...
1. Cause: The effect after the subbox is set to f...
1. Overview There are three ways to create a Dock...
I spent a day on it before this. Although Seata i...
Table of contents 1. Introduction 2. Usage 3. Dev...
When using lepus3.7 to monitor the MySQL database...
Docker image download is stuck or too slow I sear...
What is a covering index? Creating an index that ...
This article shares the 6 most effective methods,...
Achieve resultsImplementation Code html <div&g...
In many cases, arrays are often used when writing...