最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
NULL The value represents missing unknown data.
By default, the columns of a table can be stored NULL Value.
This chapter explains When creating a table, the basic syntax of NULL is as follows: 这里, Have When querying data In addition, it is impossible to compare Create Next, we’ll use Now IS NOT NULL Now, we use The results are as follows: IS NULL The following is The results are as follows: IS NULL And IS NOT NULL Operator. 5.31.1. Grammar ¶
CREATE TABLE COMPANY( ID INT PRIMARY KEY NOT NULL, NAME TEXT NOT NULL, AGE INT NOT NULL, ADDRESS CHAR(50), SALARY REAL );
NOT NULL 表示强制字段始终包含值。这意味着,如果不向字段添加值,就无法插入新记录或者更新记录。 NULL The field of the value indicates that it can be left blank when the record is created. NULL Values can cause problems because an unknown value compares with any other value, and the result is always unknown. NULL And 0, because they are not equivalent. 5.31.2. Example ¶
Example ¶
COMPANY 表( 下载 COMPANY SQL 文件 ), the data are as follows:runoobdb# select * from COMPANY; id | name | age | address | salary ----+-------+-----+-----------+-------- 1 | Paul | 32 | California| 20000 2 | Allen | 25 | Texas | 15000 3 | Teddy | 23 | Norway | 20000 4 | Mark | 25 | Rich-Mond | 65000 5 | David | 27 | Texas | 85000 6 | Kim | 22 | South-Hall| 45000 7 | James | 24 | Houston | 10000 (7 rows)
UPDATE Statement sets several fields that can be set to null to NULL :runoobdb=# UPDATE COMPANY SET ADDRESS = NULL, SALARY = NULL where ID IN(6,7);
COMPANY The watch looks like this:runoobdb=# select * from company; id | name | age | address | salary ----+-------+-----+---------------------+-------- 1 | Paul | 32 | California | 20000 2 | Allen | 25 | Texas | 15000 3 | Teddy | 23 | Norway | 20000 4 | Mark | 25 | Rich-Mond | 65000 5 | David | 27 | Texas | 85000 6 | Kim | 22 | | 7 | James | 24 | | (7 rows)
IS NOT NULL Operator puts all SALARY (payroll) the records whose values are not empty are listed:runoobdb=# SELECT ID, NAME, AGE, ADDRESS, SALARY FROM COMPANY WHERE SALARY IS NOT NULL;
id | name | age | address | salary ----+-------+-----+------------+-------- 1 | Paul | 32 | California | 20000 2 | Allen | 25 | Texas | 15000 3 | Teddy | 23 | Norway | 20000 4 | Mark | 25 | Rich-Mond | 65000 5 | David | 27 | Texas | 85000 (5 rows)
IS NULL Used to find a NULL The field of the value. IS NULL Use of operators, listing SALARY (payroll) record with empty value:runoobdb=# SELECT ID, NAME, AGE, ADDRESS, SALARY FROM COMPANY WHERE SALARY IS NULL;
id | name | age | address | salary ----+-------+-----+---------+-------- 6 | Kim | 22 | | 7 | James | 24 | | (2 rows)