Jim Newsham <[EMAIL PROTECTED]> writes: > I want to change a column from “generated always as identity” to “generated by > default as identity”. Do I have to remove/read the column, or is there an > easier way to do it?
I don't know of any easier way. Unfortunately, Derby currently doesn't support adding identity columns with ALTER TABLE .. ADD COLUMN (logged as https://issues.apache.org/jira/browse/DERBY-3888), so I think you have to create a new table. Something like 1. CREATE TABLE new_table (... same schema as old_table, but replace "generated always" with "generate by default" ...) 2. INSERT INTO new_table SELECT * FROM old_table 3. DROP TABLE old_table 4. RENAME TABLE new_table TO old_table Hope this helps, -- Knut Anders
