Oracle创建序列及循环自增取值问题
Oracle创建序列及循环自增取值问题用sys登陆OracleSQL> conn sys/root as sysdba;创建sequenceSQL> create sequence test_seq maxvalue 9 increment by 2 start with 1 cache 2 cycle;创建对应测试tableSQL> create table test_table(next number,curr number);插入测试数据(循环执行10次)SQL> insert into test_table(next,curr) values (test_seq.nextval,test_seq.currval);取出数据:SQL> select * from testseq1;NEXT CURR---------- ----------1 13 35 57 79 911 1113 1315 1517 1719 19