Is a primary key field NOT NULL by default in postgres, or does it need to be specified as such when creating the table?
Asked
Active
Viewed 589 times
1 Answers
6
Adding a primary key will automatically create a unique B-tree index on the column or group of columns listed in the primary key, and will force the column(s) to be marked
NOT NULL.
(emphasis mine)
a_horse_with_no_name
- 497,550
- 91
- 775
- 843