--版本 10g
--第 1 行出现错误:
--ORA-06502: PL/SQL: 数字或值错误 :  字符串缓冲区太小
--ORA-06512: 在 line 4declare
maxcode autoid.zyzbh%type;
begin
select max(ZYZBH) s into maxcode  from AUTOID ;end;这没做什么,怎么都报错啊

解决方案 »

  1.   

    declare
    maxcode varchar2(1000);
    begin
    select max(ZYZBH) into maxcode from AUTOID ;
    dbms_output.putline( maxcode );
    //看看内容是什么?
    end;
      

  2.   

    create table test1 (cid char(15));insert into test1 values('123456789012345');declare
     s test1.cid%type;
    begin
     select max(cid) into s from test1;
     dbms_output.put_line( 'max cid is:'||s );
    end;
    输出结果:
    max cid is:123456789012345
      

  3.   

    hongqi162(失踪的月亮) 你的版本是多少的阿,我用的是10。2g的
    我这里还是有这个错误