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