Database is HSQLDB. I have an existing sequence, say SEQ1. Now I want create another sequence SEQ2 that starts with the next value of SEQ1.
I tried
CREATE SEQUENCE SEQ2 START WITH SELECT NEXT VALUE FOR SEQ1;
CREATE SEQUENCE SEQ2 START WITH (SELECT NEXT VALUE FOR SEQ1);
CREATE SEQUENCE SEQ2 START WITH NEXT VALUE FOR SEQ1;
CREATE SEQUENCE SEQ2 START WITH (NEXT VALUE FOR SEQ1);
None of these seem to work however. Is there another way to achieve this in HSQLDB?
This is not currently possible. Only a numeric literal can be used after START WITH
or after ALTER SEQUENCE seq RESTART WITH
.