Create view on h2 database
13,002
It's a bug on this version of h2 (1.4.182).
When running a CREATE VIEW from a RUNSCRIPT command, it doesn't handle well the line-breaks (\n) on the file. I resolved adding a comment (--) before each line break.
Author by
renanleandrof
Updated on June 16, 2022Comments
-
renanleandrof about 2 years
I'm trying to create a view on H2SQL, but i cannot find the correct syntax.
I'm using:
CREATE VIEW dbo.Log AS SELECT * FROM dbo.MyTable
And i receive the error:
Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE VIEW DBO.LOG "; expected "COMMENT, (, AS";
What is the right syntax?