Обсуждение: IDENTITY columns are NOT NULL automatically

Поиск
Список
Период
Сортировка

IDENTITY columns are NOT NULL automatically

От
Erwin Brandstetter
Дата:
An IDENTITY column is automatically NOT NULL - which is per SQL standard. I think this should be documented in sql-createtable.html. The same is currently documented for PRIMARY KEY constraints:


> PRIMARY KEY enforces the same data constraints as a combination of UNIQUE and NOT NULL

I suggest to replace this paragraph:

<< This clause creates the column as an identity column. It will have an implicit sequence attached to it and the column in new rows will automatically have values from the sequence assigned to it.

With this:

>> This clause creates the column as an identity column - with an implicit sequence attached to it that automatically supplies column values for new rows. A NOT NULL constraint is applied automatically.

Regards
Erwin