I read the document on "CREATE TABLE" at https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver15
It said
timestamp data types must be NOT NULL.
However, when I create a table, I can create a field with timestamp type and make it nullable. So, what is the problem?
Update
When using the following query:
USE MyDB6;
CREATE TABLE MyTable (Col1 timestamp NULL);
I expect an error saying the column Col1 cannot be NULL but nothing happens.
After creating the table, I run the following query:
USE MyDB6
SELECT COLUMNPROPERTY(OBJECT_ID('MyTable', 'U'), 'Col1', 'AllowsNull');
I expect the result is 0, but actually it is 1.
So, my question is, though the document has said "timestamp data types must be NOT NULL.", and in the real cases, this data type will also not be NULL, why the create table query does not prevent me from setting it to nullable and the system still save the column as nullable?