Yury Shafran
unread,Sep 18, 2025, 9:27:58 AMSep 18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Hello, everyone!
I have a query that uses several CTEs followed by an INSERT statement. The behaviour differs across H2 versions.
1.4.200 - The query works fine.
2.2.224 - Some of the CTEs give empty results, so the final result is incorrect.
2.2.232 - org.h2.jdbc.JdbcSQLSyntaxException: Syntax error in SQL statement "with ... <the last CTE>)[*]insert into ..."; expected ",, (, SELECT, TABLE, VALUES
I couldn’t find in the documentation whether INSERT, UPDATE, or DELETE are supposed to support CTEs. Could someone clarify the status of this feature?
Thanks in advance!