Have you tried setting the start and increment values of the identity statement like
GENERATED ALWAYS AS IDENTITY(START WITH x, INCREMENT BY y ) where x is the last auto_increment number from mysql and y is well the step number to increment by. -- George H george....@gmail.com On Thu, Mar 5, 2009 at 6:44 PM, <ap...@gmx.at> wrote: > I need to replicate data from mysql to derby. I have the init script for the > empty derby db. Some tables have columns, which provide generated keys. > These tables are created like this: > create table foo (foo_id bigint not null generated always as identity > primary key, ... ); > > If I try to replicate my data from the other database to derby, it won't > work because derby wants to generate the key for foo_id. So my idea was to > create all tables with these columns without the "generated always as > identity" statement. Then to import all data. And after then to alter the > column again. > > The import worked, but what I couldn't do was to add the statement > "generated always as identity" to the column foo_id. > Does anybody know how can I do that? > >