Sequence [message #372172] |
Wed, 17 January 2001 11:52 |
Michelle Sudhakar
Messages: 2 Registered: January 2001
|
Junior Member |
|
|
Hi!
Currently attempting to create a sequence but gives me an error <SQL statement not ended properly> however if i do not add cycle it is executed successfully. Why?
Thanks
Michelle
create sequence cust_id_seq
increment by 2
start with 1
minvalue 1
maxvalue 9 /*upto this point execution is successful*/
cycle /* when this part is added i get the error msg*/
|
|
|
Re: Sequence - cache [message #372176 is a reply to message #372172] |
Wed, 17 January 2001 12:34 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
create sequence cust_id_seq
increment by 2
start with 1
minvalue 1
maxvalue 9
cycle
nocache
On my instance cache defaults to 20 - maybe on yours too. You only need cacheing for large sequences which will be accessed very often. Caching results in lost sequences numbers if oracle is restarted (generally).
|
|
|
Re: Sequence [message #372177 is a reply to message #372172] |
Wed, 17 January 2001 12:42 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
create sequence cust_id_seq
increment by 2
start with 1
minvalue 1
maxvalue 9
cycle
nocache
add either nocache or cache 2 to your stmt..
by default, oracle tries to cache 20 sequence numbers..
Suresh
|
|
|