alter existing table column with primary key to auto-increment

From: Rounak Jain <rounakjainis(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: alter existing table column with primary key to auto-increment
Date: 2017-02-05 10:56:18
Message-ID: CANNuxWPgcdygHPNqenfC3Ma_qpxHCO=2FTPoZZjpNS88TdwWiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I am just starting with psql.
I have created surrogate id keys in some tables.
They are primary keys.
I want to add auto-increment to them.
I can drop and then create new columns like this:

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Rounak Jain 2017-02-05 10:57:44 Re: alter existing table column with primary key to auto-increment
Previous Message David G. Johnston 2017-02-04 05:44:17 Re: Trouble with IN operator