如何为SQL Server重写最初为Oracle编写的触发器?
这是我的Oracle触发代码:
CREATE OR REPLACE TRIGGER P000KUL_TEST
BEFORE
INSERT
ON P000KUL
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
SELECT TO_CHAR(SYSDATE, 'dd/mm/RRRR') INTO :NEW.SYSTEM_DATE FROM DUAL;
SELECT TO_CHAR(SYSDATE, 'hh:mi') INTO :NEW.SYSTEM_TIME FROM DUAL;
END;