| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> why this code does not work in sqlplus?
Hi:
I am trying to create some oracle sequence based on the current max ID value. Does any one know why it does not work in sqlplus? I got the following error:
MAX(PROMOTIONID)
69819
START WITH :maxpromotionid +1
*
Here is the script:
select max(promotionID)
into :maxpromotionid
from hpxpromotion;
CREATE SEQUENCE HPXSEQ_Promotion
INCREMENT BY 1
START WITH :maxpromotionid +1
MAXVALUE 999999999
MINVALUE 1
NOCYCLE
NOCACHE;
----------------------
If you reply, please send me a copy to zlmei_at_hotmail.com
Thanks.
Guang
![]() |
![]() |