On 15/11/2016 19:58, 'Some One' anotherpersonsomewh...@mail.com
[firebird-support] wrote:
> I am trying to add new auto-increment primary keys for existing table.
>
> This is what I have:
> ==
> set term ~ ;
> execute block
> as
> declare dbkey char(8);
> begi
Den 15.11.2016 20:58, skrev 'Some One' anotherpersonsomewh...@mail.com
[firebird-support]:
> I am trying to add new auto-increment primary keys for existing table.
>
>
> This is what I have:
> ==
> set term ~ ;
> execute block
> as
> declare dbkey char(8);
> b
There are a few things missing from your setup.
Try this; there may be other ideas for you too, but this works.
create a new table
CREATE TABLE A_AUTO_TEST (
NEW_FIELD INTEGER NOT NULL,
SOME_DATA CHAR(10)
);
ensure the field you want is the PK
ALTER TABLE A_AUTO_TEST ADD CONSTRAINT P
I am trying to add new auto-increment primary keys for existing table.
This is what I have:
==
set term ~ ;
execute block
as
declare dbkey char(8);
begin
for
select rdb$db_key
from mytable
into :dbkey
do
begin
...
end
end~
set term ; ~