SET NULL Command
Determines how null values are supported by the ALTER TABLE, CREATE TABLE and INSERT - SQL commands.
SET NULL ON | OFF |
Parameters
- ON
-
Specifies that all columns in a table created with ALTER TABLE and CREATE TABLE will allow null values. You can override null value support for columns in the table by including the NOT NULL clause in the columns' definitions.
Also, specifies that INSERT - SQL will attempt to insert null values into any columns not included in the INSERT - SQL VALUE clause. INSERT - SQL can successfully insert null values only into columns that allow null values.
Note
If you add support for null values to one or more columns in a table, the limit on the number of columns for that table is reduced from 255 to 254.
- OFF
-
(Default) Specifies that all columns in a table created with ALTER TABLE and CREATE TABLE will not allow null values. You can designate null value support for columns in ALTER TABLE and CREATE TABLE by including the NULL clause in the columns' definitions.
Also specifies that INSERT - SQL will insert blank values into any columns not included in the INSERT - SQL VALUE clause.
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic