Skip to content Skip to sidebar Skip to footer

Create View On H2 Database

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.

Solution 1:

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.

Post a Comment for "Create View On H2 Database"