This is the same issue. H2 Console reads the formatted value with
JavaScript where spaces were already removed by the browser; you can
add white-space: pre style to cells (if your browser has development tools)
as a workaround.
The database is not affected.
try (Connection c = DriverManager.getConnection("jdbc:h2:mem:1")) {
Statement s = c.createStatement();
s.execute("CREATE TABLE TEST(NAME VARCHAR(255)); INSERT INTO TEST
VALUES 'Hello '");
try (ResultSet rs = s.executeQuery("TABLE TEST")) {
rs.next();
System.out.println('"' + rs.getString(1) + '"');
}
}
"Hello "
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/h2-database/b396edaf-0863-42d0-8dcd-300c0fb4e6fd%40googlegroups.com.