yes, thanks for the help, martin.
create sequence product_id_seq;
alter table product alter column id set default nextval('product_id_seq');
alter sequence product_id_seq owned by product.id;
On Fri, Feb 17, 2017 at 9:17 PM, Martin Steer <martinsteer(at)maxi(dot)net(dot)au>
wrote:
> On Sun, Feb 05, 2017 at 04:27:44PM +0530, Rounak Jain wrote:
>
>> alter table customer add column id serial primary key;
>> I want to know how to alter the column instead of dropping it.
>>
>
> Consult the online help:
>
> \h alter
>
> \h alter table
>
> \h alter sequence
>
> M.
>
>