有没有办法使用 OCI API 创建触发器?
我需要以编程方式执行以下操作:
CREATE OR REPLACE TRIGGER tbl_trigger BEFORE INSERT ON tbl FOR EACH ROW
WHEN (new.id IS NULL OR new.id = 0)
BEGIN
SELECT tbl_sq.nextval INTO :new.id FROM dual;
END;
/
有没有办法使用 OCI API 创建触发器?
我需要以编程方式执行以下操作:
CREATE OR REPLACE TRIGGER tbl_trigger BEFORE INSERT ON tbl FOR EACH ROW
WHEN (new.id IS NULL OR new.id = 0)
BEGIN
SELECT tbl_sq.nextval INTO :new.id FROM dual;
END;
/