시퀀스 확인
select * from user_sequences
트리거 확인
select * from user_triggers;
트리거 drop
drop trigger HOS_STATUS_EVENT_TR;
트리거 추가
CREATE OR REPLACE TRIGGER HOS_STATUS_EVENT_TR BEFORE
INSERT ON HOS_STATUS_EVENT FOR EACH ROW WHEN ((NEW.STATUS_ID = 0) OR (NEW.STATUS_ID IS NULL)) BEGIN :NEW.STATUS_ID := STATUS_SEQ.NEXTVAL;
END;
/
시퀀스 추가
CREATE SEQUENCE UDR_SEQ
START WITH 1
INCREMENT BY 1
CACHE 20;
댓글 없음:
댓글 쓰기