说明该word文件已经存入到blob字段中去了。 ================================================ create table man(map blob); grant create any directory to system; grant create any library to system; create or replace directory FILEDIR as 'C:\' declare a_blob BLOB; a_bfile BFILE:=BFILENAME('FILEDIR','ss.txt'); begin insert into man(map) values (empty_blob()) returning map into a_blob; dbms_lob.fileopen(a_bfile); dbms_lob.loadfromfile(a_blob, a_bfile, dbms_lob.getlength(a_bfile)); dbms_lob.fileclose(a_bfile); commit; end; select dbms_lob.getlength(map) from man;
================================================
create table man(map blob);
grant create any directory to system;
grant create any library to system;
create or replace directory FILEDIR as 'C:\'
declare
a_blob BLOB;
a_bfile BFILE:=BFILENAME('FILEDIR','ss.txt');
begin
insert into man(map) values (empty_blob()) returning map into a_blob;
dbms_lob.fileopen(a_bfile);
dbms_lob.loadfromfile(a_blob, a_bfile, dbms_lob.getlength(a_bfile));
dbms_lob.fileclose(a_bfile);
commit;
end; select dbms_lob.getlength(map) from man;