http://gigabase.idi.ntnu.no/oradoc/server.901/a90125/functions38.htm#77386
UPDATE print_media SET ad_photo = EMPTY_BLOB();

解决方案 »

  1.   

    public static void clobRead(String outfile) throws Exception{/* 设定不自动提交 */boolean defaultCommit = conn.getAutoCommit();conn.setAutoCommit(false);
    try {/* 查询CLOB对象 */ResultSet rs = stmt.executeQuery("SELECT * FROM TEST_CLOB WHERE ID='111'");while (rs.next()) {/* 获取CLOB对象 */oracle.sql.CLOB clob = (oracle.sql.CLOB)rs.getClob("CLOBCOL");/* 以字符形式输出 */BufferedReader in = new BufferedReader(clob.getCharacterStream());BufferedWriter out = new BufferedWriter(new FileWriter(outfile));int c;while ((c=in.read())!=-1) {out.write(c);}out.close();in.close();}} catch (Exception ex) {conn.rollback();throw ex;}
    /* 恢复原提交状态 */conn.setAutoCommit(defaultCommit);}