As an example
create table indexing_table
(
id SERIAL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
);
Is there a difference between the following tables?
Table 1:
create table referencing_table
(
indexing_table_id INTEGER references indexing_table
);
Table 2:
create table referencing_table
(
indexing_table_id INTEGER references indexing_table NOT NULL
);
Alternatively, in the case of Table 1, where there is no NOT NULL
constraint, are we allowed to insert records containing NULL
values?