问题
I want to insert a PNG image in DB2. I am able to insert image in my SQL using Load File function. But I don't know how to insert image in DB2 column.
回答1:
Check out the sample code provided with DB2, for example DtLob.java
回答2:
db2 sql query to insert image into table
create table table_name(column_name BLOB) /* BLOP is a data type
insert into table_name(column_name)values(blob('c:\data\winter.jpg'))
c:\data\winter.jpg is a path location , winter.jpg - image_name
来源:https://stackoverflow.com/questions/18311648/how-to-insert-image-as-blob-in-db2