I have a table with data that has no unique data anywhere on the table. I want to create a column that would serve as a unique identifier.
How do I add a new primary key column to the existing table?
I have a table with data that has no unique data anywhere on the table. I want to create a column that would serve as a unique identifier.
How do I add a new primary key column to the existing table?
You can use the following SQL statement to create a unique identifier (Primiry Key) in to your existing table.
ALTER TABLE your_table ADD key_column SERIAL;