Subject | Re: [firebird-support] Why I cannot add a primary key? |
---|---|
Author | W O |
Post date | 2011-07-22T06:48:32Z |
The table had another rows before, but I had deleted them and commited. I
had added new rows and commited.
That can be the problem?
By the way, I'm using version 2.5
Greetings.
Walter.
had added new rows and commited.
That can be the problem?
By the way, I'm using version 2.5
Greetings.
Walter.
On Fri, Jul 22, 2011 at 1:17 AM, Thomas Steinmaurer <ts@...>wrote:
> **
>
>
> > 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!
>
>
>
[Non-text portions of this message have been removed]