How to insert image as blob in DB2?

2019-07-24 14:10发布

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.

标签: db2 blob
2条回答
祖国的老花朵
2楼-- · 2019-07-24 14:34

Check out the sample code provided with DB2, for example DtLob.java

查看更多
老娘就宠你
3楼-- · 2019-07-24 14:41
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

查看更多
登录 后发表回答