开发者

Oracle OCI trigger creation

Is there any way to create trigger using OCI API?

I need to perform the following actions programmatically:

CREATE OR REPLACE TRIGGER tbl_trigger BEFORE INSERT ON tbl FOR EACH ROW
WH开发者_Python百科EN (new.id IS NULL OR new.id = 0)
BEGIN
SELECT tbl_sq.nextval INTO :new.id FROM dual;
END;
/


I'm confused as to the nature of this question.

If you're asking "Can this be done?", then yes, using OCIStmtPrepare() and OCIStmtExecute().

If you have code that attempts to do this and fails, please provide a more specific question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜