4.2.36. MySQL IFNULL () function

发布时间 :2025-10-25 12:31:22 UTC      

MySQL 函数 MySQL 函数

IFNULL() The function determines whether the first expression is NULL, returns the value of the second parameter if it is NULL, and returns the value of the first parameter if it is not NULL.

IFNULL() The function syntax format is:

IFNULL(expression, alt_value)

If the expression expression of the first parameter is NULL, the alternate value of the second parameter is returned.

参数说明:

Parameters.

Description

expression

Must, the value to be tested

alt_value

Must be the value returned when the expression expression is NULL

Example

The first parameter is NULL:

SELECT IFNULL(NULL, "RUNOOB");

The output result of the above example is:

RUNOOB

The first parameter is not NULL:

SELECT IFNULL("Hello", "RUNOOB");

The output result of the above example is:

Hello

MySQL 函数 MySQL 函数

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.