在Oracle具體的開始,我們可以做到這一點是這樣的:創建DB2序列與價值
declare current_max_value NUMBER;
begin select last_number+1 into current_max_value from USER_SEQUENCES where sequence_name = 'HIBERNATE_SEQUENCE';
execute immediate 'CREATE SEQUENCE SEQ__NEW_SEQUENCE MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH '||current_max_value|| ' CACHE 20 NOORDER NOCYCLE';
是否有DB2等同?
請標記答案。我已經發布它很久了 – 2013-01-03 11:11:36