How to add a primary key to an existing table PostgreSQL

ALTER TABLE table ADD primary key (primary_key_id);

Replace table with your table name and primary_key_id with your Primary Key

Image Credits: Photo by Isis França on Unsplash.

More Similar Posts

No results found.

Menu