I have to database, a MySQL database and a H2 database embedded in my Java application.
I want to CREATE TABLE
on H2 database joining a H2 table and a ResultSet, that is a SELECT
from MySQL database.
I want to perform this query on H2 database.
CREATE TABLE TableName AS
SELECT l.*, m.Act FROM temp AS l JOIN
(SELECT p.DES_PR AS Act, c.DES_COM AS com FROM
table_com AS c JOIN table_pr AS p
ON c.COD_PR = p.COD_PR) AS m
ON l.sel = m.com
ORDER BY Cod;
All the table except temp
is on MySQL database.
temp
table is on H2 database.
How can I create TableName
on H2 database?