SQL> CREATE SEQUENCE TEST_SEQ_A
START WITH 1
MINVALUE 0
MAXVALUE 1
INCREMENT BY -1
NOCACHE
ORDER
CYCLE ;
START WITH 1
MINVALUE 0
MAXVALUE 1
INCREMENT BY -1
NOCACHE
ORDER
CYCLE ;
SQL> Insert into test(seq) values(TEST_SEQ_A.nextval);
SQL> Select *from test;
Output:
1
0
1
0
1
0....