Oracle Sequences
发布时间:2020-12-31 03:45:57 所属栏目:站长百科 来源:网络整理
导读:Sequence: Define a Sequence to generate sequential numbers automatically ? example:可以在 update、select、insert语句中使用 SQL edWrote file afiedt.buf 1 create sequence test_seq 2 increment by 10 3 start with 100 4 maxvalue 200 5 minvalue
Sequence: Define a Sequence to generate sequential numbers automatically ? example:可以在 update、select、insert语句中使用
SQL> ed Wrote file afiedt.buf 1 create sequence test_seq 2 increment by 10 3 start with 100 4 maxvalue 200 5 minvalue 110 6 cycle 7* nocache SQL> / create sequence test_seq * ERROR at line 1: ORA-04006: START WITH cannot be less than MINVALUE SQL> ed Wrote file afiedt.buf 1 create sequence test_seq 2 increment by 10 3 start with 120 4 maxvalue 200 5 minvalue 110 6 cycle 7* nocache SQL> / Sequence created. SQL> select test_seq.nextval from dual; NEXTVAL ---------- 120 SQL> select test_seq.currval from dual CURRVAL ---------- 120 SQL> (编辑:ASP站长) 【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。 |
相关内容
未处理完善
-
无相关信息
最新更新