How to add an auto-incrementing primary key to an existing table, in PostgreSQL? May 22, 2022 by IT Nursery I have a table with existing data. Is there a way to add a primary key without deleting and re-creating the table? 5 Answers 5