Chapter Contents |
Previous |
Next |
DBNULL= |
Default value: | DBMS specific |
See Also: | NULLCHAR=, NULLCHARVAL= |
Syntax | |
Details |
Syntax |
DBNULL=(_ALL_=YES | NO) | (<column-name-1=YES | NO> <... <column-name-n=YES | NO>>) |
Details |
This option is valid only for creating DBMS tables.
If you specify more than one column name, the names must be separated with spaces.
In the following example, the EMPID and JOBCODE columns in the new MYDBLIB.MYDEPT2 table are prevented from accepting null values by using the DBNULL= option. Any subsequent attempt to insert NULL values into these columns will fail.
data mydblib.mydept2(dbnull=(empid=no jobcode=no)); set mydblib.employees; run;
In the next example, all columns in the new MYDBLIB.MYDEPT3 table, except for the JOBCODE column, are prevented from accepting null values.
data mydblib.mydept3(dbnull=(_ALL_=no jobcode=YES)); set mydblib.employees; run;Note that the DBNULL= option processes values from left to right, so if you specify a column name twice, or if you use the _ALL_ value, the last value overrides the first value specified for the column.
See your DBMS chapter for details on the option values that are supported by your DBMS.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.