Reputation: 7994
So here's some code:
statement.executeUpdate("CREATE TABLE SomeTable(id INTEGER IDENTITY, " +
"text CLOB)");
which throws an exception "Wrong data type: CLOB in statement [...]". Is there a way to store CLOBs in Hsqldb databases? The documentation says it is. Or maybe my knowledge of SQL is so rusty that I forgot how to define them.
Upvotes: 9
Views: 9420
Reputation: 24382
In version 2.0 and above, CLOB is a supported type. For your example, you should add PRIMARY KEY explicitly.
statement.executeUpdate("CREATE TABLE SomeTable(id INTEGER IDENTITY PRIMARY KEY, " +
"text CLOB)");
Upvotes: 4