Unanswered: Column-oriented table: generated column not supported?
I'm just about to exploit DB2 10.5 on a Suse Enterprise Linux VM provided by IBM.
I setup workload=analytics and created a column-oriented db.
I wanted to use the SQL dump of my existing (row-oriented) SQL application for a comparison.
However, the insert statements fail as follows:
Create statements with generated columns which I heavily use in the application like this one:
CREATE TABLE tab1 (
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY ( START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 250000),
organize by column;
"The CREATE TABLE statement failed because some functionality was specified in the table definition that is not supported with the table type. Unsupported functionality: "Generated column".. SQLCODE=-1666, SQLSTATE=42613, DRIVER=3.67.28v"
Does anyone know a workaround to modify the insert statements so that I can use a column-oriented db (without modifiy all my java application code on top)?
I thought of using sequences but as I got it, I cannot refer to them by my existing java code using "return_generated_keys" like in
"PreparedStatement t = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)".
It seems to me that there a kind of "unofficial" restrictions to column-oriented tables in SQL, is there a list of IBM?