Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Finderr

-287 Cannot add serial column column-name to table.

You cannot add a column of SERIAL or SERIAL8 or BIGSERIAL data type to an existing table. Such columns may not contain null values, but when you add a column, the database server must put null values in all existing rows. You can add a serial column in three steps. First, add the column with an INTEGER data type. Then update the table with nonnull, unique values in each row of the new column. Finally, use ALTER TABLE MODIFY to change the data type of the column to SERIAL or SERIAL8 or BIGSERIAL.