Best Answer
Nextnumber is the beginning of the next value to be cached by the sequence. That is, the number behind the cache buffer, if cache10, the next nextnumber is 11
Nextval is the sequence that takes out the next value, and every time it is fetched, it accumulates once
1 2 3 4 5 6 |
CREATE SEQUENCE Seq_user INCREMENT by 1--add a few start with 1 at a time--counting Nomaxvalue from 1--not setting the maximum nocycle--has been cumulative, Do not cycle CACHE 10; |
The test code is as follows:
1 2 3 4 |
Select Seq_user.nextnumber from dual; --Returns 1 select Seq_user.nextnumber from dual; --Return one select Seq_user.nextval from dual; --Returns 1 select Seq_user.nextval from dual; --Return 2 |
Best Answer
Nextnumber is the beginning of the next value to be cached by the sequence. That is, the number behind the cache buffer, if cache10, the next nextnumber is 11
Nextval is the sequence that takes out the next value, and every time it is fetched, it accumulates once
1 2 3 4 5 6 |
CREATE SEQUENCE |