alter table add primary key constraint postgresql code example
Example: postgres alter table add primary key
-- To set a column as primary key:
ALTER TABLE distributors ADD PRIMARY KEY (tablename);
-- To set a column as primary key:
ALTER TABLE distributors ADD PRIMARY KEY (tablename);