Condividi tramite


Null Value Handling

Visual FoxPro provides support for null values. This support simplifies the task of representing unknown data and makes it easier to work with Microsoft Access or SQL databases that may contain null values.

Null values are:

  • Equal to the absence of any value.
  • Different than zero, the empty string (""), or blank.
  • Sorted ahead of other data.
  • Propagated in calculations and most functions.

Null values affect the behavior of commands and functions, logical expressions, and parameters.

Visual FoxPro support for null values complies with ANSI standards and affects any area of the product where values and expressions are used.

To use null values in See
Commands and functions Behavior of Null Values in Commands and Functions
Expressions Behavior of Null Values in Logical Expressions
Parameters NULL as a Parameter

Using NULL in Values and Expressions

In Visual FoxPro, you assign the null value programmatically with the .NULL. token or interactively with CTRL+0 in a field. Note that the periods around .NULL. are optional. To detect whether a field or variable contains a null value, or whether an expression evaluates to a null value, use ISNULL( ).

See Also

Behavior of Null Values in Logical Expressions | Behavior of Null Values in Commands and Functions | EMPTY( ) Function | ISBLANK( ) Function | ISNULL( ) Function | NULL as a Parameter | NULL as a Value | Data Manipulation