orcal 字段自增的方法

CREATE SEQUENCE T_YDXC_TASK_USER_LOCATION_SEQ
MINVALUE 1
NOMAXVALUE
INCREMENT BY 1
START WITH 1 NOCACHE ;
T_YDXC_TASK_USER_LOCATION_SEQ

--创建触发器
create or replace trigger T_LOCATION_OBJECTID_TRIGGER
before insert on YDXC_TASKS_USER_LOCATION
for each row
begin
select T_YDXC_TASK_USER_LOCATION_SEQ.nextval into :new.OBJECTID from dual;
end T_LOCATION_OBJECTID_TRIGGER;

你可能感兴趣的:(orcal 字段自增的方法)