开发者

How to change Sequence LAST_NUMBER in Oracle [duplicate]

This question already has answers here: 开发者_如何学GoClosed 11 years ago.

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';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜