'CUBRID'에 해당되는 글 1건

총 3단계를 거쳐야 함.



1. 큐브리드 쿼리매니저에서 아래 쿼리 실행


select 'select ''alter serial '|| name ||' start with ''|| nvl(max('||att_name||'),1) || '';'' from '||class_name||' ;'

from db_serial where class_name is not null;


모든 테이블에 대해 auto_increment 초기화 쿼리를 만들어 준다




2. 결과 행에서 auto_increment 초기화 하고 싶은 테이블이 포함된 행을 복사


select 'alter serial tn_comment_info_ai_seq start with '|| nvl(max(a),1) || ';' from tn_comment_info;




3. 선택된 테이블의 다음 auto_increment 값 적용


Alter serial tn_comment_info_ai_seq start with 100;




끝.

블로그 이미지

엘로드넷

,