Oracle自增序列字段

分類:編程 時間:2017-03-30

Oracle自增序列字段

先創建sequence create sequence human_bi_xq_seq increment by 1 start with 1 minvalue 1 maxvalue 9999999999999 nocache order;

然後給表創建觸發器 create or replace trigger human_bi_xq_trigger before insert on human_bi_xq for each row begin select human_bi_xq_seq.Nextval into:new.PID from sys.dual ; end;
Tags:

文章來源:


ads
ads

相關文章
ads

相關文章

ad