create or replace directory gp as 'c:gp';
insert into pict values('maoyaxi',empty_blob());
declare
dest_lob blob;
src_lob bfile:=bfilename('GP','maoyaxi.jpg');
amount integer:=dbms_lob.getlength(src_lob);
begin
select pict into dest_lob from pict
where pictname='maoyaxi' for update;
dbms_lob.fileopen(src_lob);
dbms_lob.loadfromfile(dest_lob,src_lob,amount);
dbms_lob.fileclose(Src_lob);
commit;
end;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9907339/viewspace-1045207/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9907339/viewspace-1045207/