为什么在存储过程中这样使用序列不行:
v_ID number;
v_ID := st_test.nextval;

解决方案 »

  1.   

    select st_test.nextval into v_id from dual;
      

  2.   

    谢谢!bzszp(SongZip) 该问题已经解决了和你的方法类似。再问一下:
    CREATE OR REPLACE procedure pws
    is
    begin
    insert into test (nodeid) values(3);
    commit;
    end;
    /
    begin
    exec p1w
    end;
    The following error has occurred:ORA-06550: 第 2 行, 第 6 列: 
    PLS-00103: 出现符号 "P1W"在需要下列之一时:
    :=.(@%;
    符号 ";在 "P1W" 继续之前已插入。
    注:使用的是TOAD
      

  3.   

    begin
     pws;
    end;
    /