postgres alter table add primary key
snippet in sql

postgres alter table add primary key

user3947

-- To set a column as primary key:
ALTER TABLE distributors ADD PRIMARY KEY (tablename);