0
我已连接到通过JDBC我的新的DB2数据库,我试图创造并插入一个临时表:无法插入到一个临时表
String createTemporaryTable = "declare global temporary table temporary_table (RECORD smallint) ON COMMIT PRESERVE ROWS in TEMPTABLESPACE";
statement.execute(createTemporaryTable);
String insert = "INSERT INTO temporary_table (RECORD) VALUES (1)";
statement.execute(insert);
connection.commit();
这导致
"DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704"
创建一张正常的表格并以这种方式插入不会导致错误。有什么我需要配置?