next up previous contents index
Next: 4.2.6.2 Query Results Up: 4.2.6 Handling NULL values Previous: 4.2.6 Handling NULL values   Contents   Index

4.2.6.1 Queries

| ?- dept('NULL'(_),_,_).

Generates the query:

SELECT NULL , rel1.DNAME , rel1.LOC
			  FROM DEPT rel1
			  WHERE rel1.DEPTNO IS NULL;

Hence, 'NULL'(_) can be used to retrieve rows with NULL values at any field.

'NULL'/1 fails the predicate whenever it is used with a bound argument.

| ?- dept('NULL'(null2745),_,_). $\rightarrow$ fails always.



Terrance Swift 2007-10-06