这个要求可以通过BLOB大对象类型进行存储,即你在建表时放图生的列属
性就用此类型,然后通过java.sql.*包的Blob类方法生成IO流进行读写!

解决方案 »

  1.   

    给各PLSQL的例子了:
    create or replace procedure insertpic is 
    a_blob  BLOB;
    a_bfile BFILE := BFILENAME('PICDIR','6.jpg');
    begin
       insert into pic_blf values (a_bfile)
       returning bilfe_column into a_bfile;
       insert into pic1 values ('1111',empty_blob())
       returning pic 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;
    /