I created a table with a single column of REAL type:
CREATE TABLE test.mytable (a REAL NOT NULL);
The SQL type REAL is a 32-bit floating point type. Using JDBC, I tried
to insert the maximum value of a 32-bit floating point number, which
is Float.MAX_VALUE, into this table:
PreparedStatement ps = connection.prepareStatement("insert into
test.mytable (a) values (?)");
However, it failed with the following exception:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0302N The
a host variable in the EXECUTE or OPEN statement is too large for its
ing use. SQLSTATE=22003
So it seems that the maximum value that a REAL column can store is
less than Float.MAX_VALUE. What is the maximum value then?
Thanks in advance.