db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ap...@gmx.at
Subject generated always as identity
Date Thu, 05 Mar 2009 16:44:38 GMT
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?

View raw message