DECLARE
   sequence_start NUMBER := 0;
   increment_val  NUMBER := 0;
BEGIN
   SELECT COALESCE(MAX(LABEL_ID),1) INTO sequence_start FROM TASK_LABELS;
   EXECUTE IMMEDIATE 'ALTER sequence SEQ_TASK_LABELS_LABEL_ID INCREMENT BY '||sequence_start;
   SELECT SEQ_TASK_LABELS_LABEL_ID.NEXTVAL INTO increment_val FROM DUAL;
   EXECUTE IMMEDIATE 'ALTER sequence SEQ_TASK_LABELS_LABEL_ID INCREMENT BY 1';
END;
/