:new.recno := ldp_ma.nextval;

解决方案 »

  1.   

    create sequence your_seq
    nocycle
    maxvalue 9999999999
    start with 1;2.使用触发器实现自增:
    create or replace trigger your_seq_tri
    before insert on your_table1 for each row
    declare
      next_id number;
    begin
      select your_seq.nextval into next_id from dual;
      :new.id := next_id;
    end;
      

  2.   

    谢谢两位指点,我试过之后都不对,最后用下面的语句实现了:
    select LDP_MA.nextval into :new.recno from dual;