When I run this query: ALTER TABLE “tblProperties” ALTER COLUMN “PropId” SET GENERATED BY DEFAULT AS IDENTITY I get the following error message: Unexpected token: GENERATED in statement [ALTER TABLE “tblProperties” ALTER COLUMN “PropId” SET GENERATED]. I’m using MacOsx 10.13.6, LO 6.2.5. I’ve tried with and without the double quotes, I tried with and without single quotes, I’ve upper case, lower case and mixed case as shown in the tables area, and with and without the ending semicolon all to no avail. Thanks in advance.
ps. I ran this query under Tools=>SQL. Also, when I remove the quotes, the error says tblProperties not found.
Hello,
What is the database you are applying this to - HSQLDB embedded, Firebird embedded, other(specify)? Since this is an existing table, is this the primary key and the only column as the key? What is the field type - INT, etc?
Db is HSQLDB embeded, PropId is type INT and is the only PK column in this table.
Hello,
The problem is a missing field type and PK designation in the statement:
ALTER TABLE "tblProperties" ALTER COLUMN "PropID" INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
worked for me.
Thank you!! Command successfully executed after I changed PropID to PropId.
Please, if the answer solves the question click .