Subject Re: [firebird-support] Why I cannot add a primary key?
Author Thomas Steinmaurer
> Yes, of course.

The following runs fine with 2.1.4 and 2.5.0:

recreate table t2 (
pk1 integer not null
, pk2 integer not null
, constraint pk_t2 primary key (pk1, pk2)
);
commit;

insert into t2 values (1, 1);
insert into t2 values (1, 2);
commit;

alter table t2 drop constraint pk_t2;
commit;

alter table t2 add pk3 integer not null;
commit;

update t2 set pk3 = pk2 + 1;
commit;

alter table t2 add constraint pk_t2 primary key (pk1, pk2, pk3);
commit;




--
With regards,

Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/

Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!