虚位以待(AD)
虚位以待(AD)
首页 > 数据库 > Oracle数据库 > Oracle自增序列字段

Oracle自增序列字段
类别:Oracle数据库   作者:码皇   来源:<a href="http://blog.csdn.net/liuxiang860927" target="_blank" rel="nofol   点击:

Oracle自增序列字段。

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;
相关热词搜索: