'oracleseq'에 해당되는 글 1건

  1. 2020.11.06 오라클 시퀀스 한번에 증가시키기
Oracle2020. 11. 6. 11:53

 

 

 

1. 시퀀스의 현재값 가져오기 (시퀀스명은 ASSE_NO_SEQ라 가정)
select ASSE_NO_SEQ.currval from dual;


2. 시퀀스값 1씩 증가시키기
select ASSE_NO_SEQ.nextval from dual;


3. 시퀀스값 한꺼번에 증가시키기
증가분을 늘려주도록 alter 칠 수 있다.
alter sequence ASSE_NO_SEQ increment by 200;
select ASSE_NO_SEQ.nextval from dual;
alter sequence ASSE_NO_SEQ increment by 1;

Posted by 사슴영혼'-'