DECLARE
MAXVAL MY_TABLE.ID%TYPE;
BEGIN
SELECT NVL(MAX(id),1) INTO MAXVAL FROM MY_TABLE;
EXECUTE IMMEDIATE 'CREATE SEQUENCE MY_TABLE_SEQ START WITH ' || MAXVAL || ' INCREMENT BY 1';
END
/
Anda juga dapat MENGUBAH urutan setelah dibuat.
Beberapa bacaan tentang subjek: http://asktom.Oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:951269671592