How to change Sequence LAST_NUMBER in Oracle [duplicate]
Possible Duplicate:
How do I reset a sequence in Oracle?
I would like to change one parameter of sequence LAST_NUMBER to some number, how can i do it through SQL query.
ALTER SEQUENCE MSG_MESSAGE_SEQUENCE RESTART WITH 97
And it is not working.
From here:
'select MSG_MESSAGE_SEQUENCE.nextval from dual' INTO l_val;
execute immediate
'alter sequence ' || p_seq_name || ' increment by 97 - ' || l_val || ' minvalue 97';
精彩评论