Progress
Embedded SQL-92
Guide and Reference
Use Indicator Variables
You can use indicator variables to insert NULL values into a column. Set the indicator variable for a particular column to negative one ( -1 ) and use the indicator variable along with the associated host variable in the value list of the INSERT statement.
EXAMPLEThe following example shows how to insert NULL values for the commission and projno columns in the employee table using indicator variables:
This example illustrates setting the indicator variable to negative one ( -1), rather than placing the NULL keyword in the INSERT statement. The program then inserts a NULL value, not the value in the host variable.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |