CREATE OR REPLACE TRIGGER AUTOINCREMENTForvideo_log
BEFORE INSERT ON epass_video_log
FOR EACH ROW
when (NEW.log_id IS NULL)
BEGIN
SELECT video_log_Seq.NEXTVAL INTO :NEW.log_id FROM DUAL;
END;
orcle触发器实现id自增
最新推荐文章于 2024-08-29 17:00:41 发布
CREATE OR REPLACE TRIGGER AUTOINCREMENTForvideo_log
BEFORE INSERT ON epass_video_log
FOR EACH ROW
when (NEW.log_id IS NULL)
BEGIN
SELECT video_log_Seq.NEXTVAL INTO :NEW.log_id FROM DUAL;
END;