------------------------Ò»¸öÀý×Ó----------------------- create sequence for_test --ÐòÁÐÃû increment by 1 --ÿ´ÎÔö¼Ó1 start with 1 --´Ó1¿ªÊ¼ nomaxvalue --ûÓÐ×î´óÖµ nocache --ûÓлº´æÐòÁÐ
----------------------------´´½¨²âÊÔ±í------------------ create table Test ( id number(10) primary key, name varchar2(20) not null, desc varchar2(200) null )
-----------------------------ʹÓÃÐòÁÐ------------------- insert into Test values(for_test.nextval,'ÐòÁвâÊÔ','ÕâÊÇÒ»¸öÐòÁÐʹÓõÄÀý×Ó')
--------------------ÐòÁÐʹÓýá¹û²éѯ----------------- select * from test
ÎÒÔÚ²åÈëµÄʱºò²»Ïëдfor_test.nextval ¿ÉÒÔÂ𣿠È磺 insert into Test values('ÐòÁвâÊÔ','ÕâÊÇÒ»¸öÐòÁÐʹÓõÄÀý×Ó')