Oracle实现字段自动增长

      DataBase 2005-10-8 9:32
序列:
CREATE SEQUENCE "user"."sequence_name" INCREMENT BY 1 START WITH 1
MAXvalue 1.0E28 MINvalue 1 NOCYCLE
CACHE 20 NOORDER;

触发器:
CREATE OR REPLACE TRIGGER "user"."trigger_name" BEFORE
INSERT ON "user"."table" FOR EACH ROW begin
Select "user"."sequence_name".Nextval into :New.ID From Dual;
end;
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commenttime}{commentauthor}

{CommentUrl}
{commentcontent}