想要将db2老库里的数据导出来放到mysql数据库来,字段为blob类型,导出来的数据为.lob文件。想请教一下怎样将.lob类型的数据导入到mysql,或者是又更好的解决方法。
db2 "export to emp_photo of del lobs to . select * from emp_photo where empno=000130 and photo_format='bitmap' "
会生成 emp_photo.001.lob
之后用mysql导入
CREATE TABLE MyTable ( image BLOB );
INSERT INTO MyTable (image) VALUES(LOAD_FILE('/tmp/emp_photo.001.lob'));
可以写个脚本一张图片 一张处理。 最好写程序来处理
收起