Hi,

You need to drop the primary key constraint first, because primary key
columns can't be altered:

drop table test;
create table test(id int primary key);
insert into test values(1), (2), (3);
alter table test drop primary key;
alter table test alter column id identity;

Regards,
Thomas

On Wed, Feb 4, 2009 at 6:56 PM, rafael <[email protected]> wrote:
>
> I've already a column and it's a primary key. Can I change the column
> to be "auto_increment"?
>
> Thanks
>
> Rafael
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to