, , , , , . SQL , NULL () , . NULL, , ( ). , . , NULL , . . , NULL SQL .
, , . , , , . NULL snum , .
NULL
NULL , , NULL. NULL , NULL, , , . , , , , , NOT () , NOT () . , 'city = NULL' 'city IN (NULL)' , city. "" "" , , NULL . , SQL IS, NULL, NULL. NULL city:
SELECT *
FROM Customers
WHERE city IS NULL;
, NULL . NULL , .
NOT
, , NOT.
, NOT . , NULL , NOT, :
SELECT *
FROM Customers
WHERE city NOT NULL;
NULL ( ), . :
SELECT *
FROM Customers
WHERE NOT city IS NULL;
|
|
.
NOT IN:
SELECT *
FROM Salespeople
WHERE city NOT IN ('London', 'San Jose');
:
SELECT *
FROM Salespeople
WHERE NOT city IN ('London', 'San Jose');
5.9.
=============== SQL Execution Log ============
| SELECT * |
| FROM Salespeople |
| WHERE city NOT IN ('London', 'San Jose'; |
| ==============================================|
| snum sname city comm |
| ------ ---------- ----------- ------- |
| 1003 Rifkin Barcelona 0.15 |
| 1007 Axelrod New York 0.10 |
===============================================
5.9. NOT IN
NOT BETWEEN NOT LIKE.
SQL. (BETWEEN) (IN), (LIKE).
, SQL NULL . NULL , IS NULL ( NOT NULL).
, , SQL, , , . 6.
SQL
1. , 3 4 1990
2. , , Peel Motika. (: , snum )
3. , , A G.
4. , , C.
5. , NULL amt ().
(. A .)