I have a table which has an Id column as int but not mentioned as a primary key. Now I want to add primary key constraint as serial. I've seen this question Postgresql 9.4, Make existing primary key as SERIAL however this is using alter table
statement while my intention is doing that with constraint. Is there any way to do that like below?
constraint "PK_tablename" serial primary key ("Id")