Primary key does not generate any values by itself. It is constraint. In your example you need do next:
- Add column for PK value, declare it NOT NULL
- Fill in the column with unique values
- Create PK constraint
Example:
CREATE TABLE test (a varchar(20));
COMMIT;
INSERT INTO test (a) VALUES ('A');
INSERT INTO test (a) VALUES ('B');
INSERT INTO test (a) VALUES ('C');
COMMIT;
ALTER TABLE test ADD pk INTEGER NOT NULL;
CREATE GENERATOR g_test;
COMMIT;
UPDATE test SET pk = GEN_ID(g_test, 1);
ALTER TABLE test ADD CONSTRAINT test_pk
PRIMARY KEY (pk);