orcal 字段自增的方法

2022-07-12  本文已影响0人  Mylovesunshine

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;

上一篇下一篇

猜你喜欢

热点阅读