I've found a solution
INSERT INTO XXX (
...
"JSON_FILE" ,
...
) VALUES (
...
FILE_READ('classpath:/j1.json') ,
...
) ;
See
https://stackoverflow.com/questions/38353487/insert-blob-from-a-file-into-a-sql-script-to-embed-h2-database
Le mercredi 9 octobre 2019 10:25:38
Hi Eyvgenij,
here's the situation. My colleagues and I are currently working on a Spring
Boot project that uses Oracle. However, although one of the developers has
managed to install Oracle 11 on his machine, the 4 others haven't,
probably because of company-wide security policies (who knows).
BLOB or CLOB values in in-memory database? Bad idea in general, when you
use an in-memory database, it should be small enough.
If you want to connect to the database from another process, you need to
start a TCP Server inside of the process that owns the database.
org.h2.tools.Server tcp =
Hi,
thank you for your suggestions.
Can the prepared statement be run from outside (a standalone Java program) the
(Spring Boot) project that created an in-memory H2 database containing a table
with a BLOB column, or must it run from inside?
> Le 9 oct. 2019 à 03:51, Evgenij Ryazanov a écrit :
Hello.
H2 is not different from others, JDBC has java.sql.Blob interface that
should be used, use Collection.createBlob() to allocate a BLOB instance,
use one of its methods to put your data into it, and use
PreparedStatement.setBlob() to pass this BLOB to the command. There are
also an