To enable a column to be nullable, the NULL keyword is added immediately after the data type.
To prevent nulls, the NOT NULL keywords are added.
If NULL or NOT NULL is not specified, the default setting is to allow nulls.
7>
8> CREATE TABLE MyTable (
9> Category nVarChar(50) NOT NULL,
10> MyDescription nVarChar(50)
11> )
12> GO
1>
2> drop table MyTable;
3> GO
|