Following is the H2DB query What I am trying to achieve is to insert a record into userpermission for user with given email address in user table, for each permission in permission table. Following is the error The same query is working in MySQL. Answer As mentioned in the comments, Use single quotes for sting constants. Do not use braces
Tag: h2
H2 Get row count for all tables
I would like to know the total number of rows for each table. And that for all tables at once. Is this possible with H2? I’m thinking of a table: |table name | row size | At the moment I’m using the current version 1.3.170 (2012-11-30). Answer You would need to use a user-defined function, for example: This code doesn’t
SQL exception preparing query with ORMLite
I am using an ORM (ORMlite) and all my calls are going well until I get the following error. Exception in thread “main” org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement ” SELECT * …