Oracle Sequence例子

注册

CREATE OR REPLACE PROCEDURE USER_REGIST (ver in varchar2,userid out int)IS 

BEGIN 
   insert into mass_user(id,version) values(SEQ_CDML_USER_ID.nextval,ver); 
   
    select SEQ_CDML_USER_ID.currval into userid from dual; 
    
    return; 
END USER_REGIST; 
 

得到一个值 Sequence SEQ_CDML_USER_ID

 

你可能感兴趣的:(oracle)