When you connect to an embedded local H2 database like so:
jdbc:h2:./target/data/CATALOGA;
H2 uses the database name (CATALOGA here) as the CATALOG_NAME. This can be seen by querying the INFORMATION_SCHEMA.CATALOGS table.
Is it possible to have more than one catalog?
You cannot insert into the INFORMATION_SCHEMA and H2 does not allow for CREATE CATALOG
statements.
Background information is that we have queries that join across catalogs. So something that looks like:
select * from CATALOGA.dbo.example e
inner join CATALOGB.dbo.example2 e2 on e.fk = e2.fk
The queries have catalog/schema in them directly and I need to be able to execute them on H2.