| Jayanta |
Posted: Nov 12, 2006 04:01:05 PM |
Total Post: 479
Joined: Feb, 2006
|
hello everybody!
i have created a sequence named'test1_sq' with the following commands:
SQL> create sequence test1_sq
2 start with 1
3 increment by 1
4 maxvalue 10
5 minvalue 1
6 cache 3
7 nocycle;
Sequence created.
oracle study mat saying that the "last_number" column displays the next available sequence number if nocache is specified.
but my creation script contains "cache 3"
still my query with last_number returns the next available sequence number:
SQL> select sequence_name,last_number from user_sequences where sequence_name='TEST1_SQ'
SEQUENCE_NAME LAST_NUMBER
------------------------------ -----------
TEST1_SQ 4
SQL>
may i know the reason why?????
please help!!!!
i am using oracle 9i rel 2 on windows xp with servicepack2. |
|
|
snehalatha |
| Posted: Nov 13, 2006 12:34:17 AM | |
|
Total Post: 169
Joined: Apr, 2006
|
CACHE specifies how many values of the sequence Oracle preallocates and keeps in memory for faster access.
If you specify the CACHE Last_number would be 4
If you won't specify the CACHE last_number displays the next available sequence number.
|
|
|
|
|
Jayanta |
| Posted: Nov 13, 2006 02:54:01 PM | |
|
Total Post: 479
Joined: Feb, 2006
|
THANKS A LOT SNEHALATA.
BYE
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |