在sqlplus全部输出clob字段的内容 | 您所在的位置:网站首页 › sqlplus查询数据文件的标识和大小 › 在sqlplus全部输出clob字段的内容 |
在sqlplus全部输出clob字段的内容[@more@]
在sqlplus全部输出clob字段的内容创建表create table tp_clob( test clob;);使用工具pl/sql developer中写入如下内容create or replace function fn_test(v_table in varchar)return numberasv_count number;v_sql varchar2(100);begin v_sql:= 'select count(*) from '||v_table; execute immediate v_sql into v_count; return v_count;end; 默认的设置在sqlplus中查询的时候只能输出部分内容:SQL>select test from tp_clob;create or replace function fn_test(v_table in varchar)return numberasv_count number; 通过设置参数set long 100000可以输出clob字段的全部内容SQL>set long 100000;SQL>select test from tp_clob;TEST-------------------------------------------- create or replace function fn_test(v_table in varchar)return numberasv_count number;v_sql varchar2(100);be |
CopyRight 2018-2019 实验室设备网 版权所有 |