Reputation: 186
I would like to create a sequence in oracle that will consists of two values(1, -1).
Sequence will be 1,-1,1,-1,1,-1
Is it possible to create this type of sequence in oracle that will alternate between this two values only?
Is this possible using standard Create sequence syntax in oracle?
Upvotes: 0
Views: 285
Reputation:
Yes, this is possible:
create sequence seq_alternate
minvalue -1
maxvalue 1
start with 1
increment by 2
nocache
cycle;
Upvotes: 3