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

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.



Luis Fernando P. de Castro 2003-06-27