Skip to content
Advertisement

Tag: h2

INSERT INTO table SELECT not working with constant values in H2 DB

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

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

Advertisement