Any idea on H2 (Oracle MODE) "Syntax error : SELECT NEXTVAL FROM[*] DUAL"?
I was working on h2 with Oracle mode but all the above solutions mentioned above didn't work for me. Although after some research I found that this query will work fine for fetching the next value in the sequence.
select nextval('SchemaName', 'SequenceName')
;
Please ensure the sequence is created. If it is created, then it works for me:
create sequence SQ_PERSON_ID;
select SQ_PERSON_ID.nextval from dual;
If it is not created, then the same error message is thrown as you got.