日期:2014-05-16 浏览次数:20526 次
create or replace procedure get_news as v_varchar VARCHAR2(1000); v_start PLS_INTEGER := 1; v_buffer PLS_INTEGER := 1000; begin dbms_output.enable(1000000); for rec in (select test,name,value from test) loop FOR i IN 1..CEIL(DBMS_LOB.GETLENGTH(rec.value) / v_buffer) LOOP dbms_output.put_line('value是CLOB类型,从'||v_start||'起获取:'||DBMS_LOB.SUBSTR(rec.value, v_buffer, v_start)); v_start := v_start + v_buffer; end loop; end loop; end;