adding primary key later in postgresql code example Example: postgres 11 add primary key ALTER TABLE [table_name] ADD PRIMARY KEY ( [col_name] );