EXPLAIN VALUES CAST(2 AS DOUBLE PRECISION);
> VALUES (CAST(2.0 AS DOUBLE))
In the SQL Standard there is no DOUBLE data type and some databases, including Oracle, PostgreSQL, and SQL Server don't accept it. They all accept DOUBLE PRECISION name from the SQL Standard.
H2 usually preserves names of data types when they're used in table definitions as column data types, but H2 always normalizes them into own default names in all expressions (default and generated columns, check constraints, views, etc.). In result, SCRIPT output contains definitions not compatible with other database systems.
The default name of this data type should be standard-compliant.
@grandinj
Do you agree?