给你个例子吧
declare
v_str   raw(2000);
v_amount int;
v_file BFILE;
begin
--  select photo into v_file from fjmam.tt1 where u_id = 1;
 v_file := BFILENAME('PHOTO','movie\2.txt');
 dbms_lob.fileopen(v_file,dbms_lob.FILE_READONLY);
 v_amount := 1000;
 dbms_lob.read(v_file,v_amount,1,v_str);
 dbms_output.put_line(utl_raw.CAST_TO_VARCHAR2(v_str));
 if dbms_lob.fileisopen(v_file) = 1 then
  dbms_lob.fileclose(v_file);
 end if;
 EXCEPTION
WHEN OTHERS THEN
if dbms_lob.fileisopen(v_file) = 1 then
  dbms_lob.fileclose(v_file);
end if;
end;
/