首页 > 解决方案 > 从 t2 的图像(BLOB)更新 t1 的图像(BLOB 列)

问题描述

我需要你帮忙。我正在使用 oracle 数据库 11g 和 pl/sql,我得到的错误是“ORDSYS.ORDIMGB”未声明。有人可以帮忙吗?ORDIMGB 是包还是程序?如果是的话如何创建它?谢谢你。

DECLARE 
    Image_1 ORDSYS.ORDIMGB; 
    Image_2 ORDSYS.ORDIMGB; 
BEGIN 
    select photo
    into Image_1
        from t1
        where ID = 1; 

        select PHOTO
    into Image_2
        from t2
        where ID = 1 for UPDATE; 

    -- copy the data from Image_1 to Image_2 
    Image_1.copyContent(Image_2.content); 

    -- set the image properties for Image_2 
    Image_2.setProperties; 

    -- continue processing 

    UPDATE t2
     SET PHOTO = Image_2 
     WHERE ID = :1; 

exception
    when others then
    rollback;
end;

标签: databaseoracleplsql

解决方案


推荐阅读