{"id":15970,"date":"2023-12-04T23:44:08","date_gmt":"2023-12-04T15:44:08","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=15970"},"modified":"2023-12-05T00:26:54","modified_gmt":"2023-12-04T16:26:54","slug":"oracle-zhong-plsql-zhong-cun-zai-ji-zhong-lei-xing","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/12\/04\/oracle-zhong-plsql-zhong-cun-zai-ji-zhong-lei-xing\/","title":{"rendered":"Oracle \u4e2d PLSQL \u4e2d\u5b58\u5728\u51e0\u79cd\u7c7b\u578b\u7684\u89e6\u53d1\u5668\uff1f"},"content":{"rendered":"<p>\u5728 Oracle \u4e2d\uff0cPL\/SQL \u89e6\u53d1\u5668\u5206\u4e3a\u4e24\u79cd\u4e3b\u8981\u7c7b\u578b\uff1a\u884c\u7ea7\u89e6\u53d1\u5668\uff08Row-level triggers\uff09\u548c\u8bed\u53e5\u7ea7\u89e6\u53d1\u5668\uff08Statement-level triggers\uff09\u3002<\/p>\n<ol>\n<li>\n<strong>\u884c\u7ea7\u89e6\u53d1\u5668\uff08Row-level triggers\uff09\uff1a<\/strong><\/p>\n<ul>\n<li><strong>BEFORE EACH ROW\uff08BEFORE INSERT\/UPDATE\/DELETE\uff09\uff1a<\/strong> \u5728\u6bcf\u4e00\u884c\u53d7\u5230 INSERT\u3001UPDATE \u6216 DELETE \u8bed\u53e5\u5f71\u54cd\u4e4b\u524d\u89e6\u53d1\u3002<\/li>\n<li><strong>AFTER EACH ROW\uff08AFTER INSERT\/UPDATE\/DELETE\uff09\uff1a<\/strong> \u5728\u6bcf\u4e00\u884c\u53d7\u5230 INSERT\u3001UPDATE \u6216 DELETE \u8bed\u53e5\u5f71\u54cd\u4e4b\u540e\u89e6\u53d1\u3002<\/li>\n<\/ul>\n<p>\u884c\u7ea7\u89e6\u53d1\u5668\u7684\u4e3b\u8981\u7279\u70b9\u662f\u5b83\u4eec\u5728\u6bcf\u4e00\u884c\u4e0a\u6267\u884c\uff0c\u56e0\u6b64\u5b83\u4eec\u53ef\u4ee5\u8bbf\u95ee\u548c\u64cd\u4f5c\u53d7\u5230\u5f71\u54cd\u7684\u884c\u7684\u6570\u636e\u3002\u8fd9\u4f7f\u5f97\u884c\u7ea7\u89e6\u53d1\u5668\u7279\u522b\u9002\u7528\u4e8e\u9700\u8981\u5728\u63d2\u5165\u3001\u66f4\u65b0\u6216\u5220\u9664\u6bcf\u4e00\u884c\u65f6\u6267\u884c\u64cd\u4f5c\u7684\u60c5\u51b5\u3002\n<\/li>\n<li>\n<strong>\u8bed\u53e5\u7ea7\u89e6\u53d1\u5668\uff08Statement-level triggers\uff09\uff1a<\/strong><\/p>\n<ul>\n<li><strong>BEFORE INSERT\/UPDATE\/DELETE\uff1a<\/strong> \u5728\u6574\u4e2a INSERT\u3001UPDATE \u6216 DELETE \u8bed\u53e5\u6267\u884c\u4e4b\u524d\u89e6\u53d1\u3002<\/li>\n<li><strong>AFTER INSERT\/UPDATE\/DELETE\uff1a<\/strong> \u5728\u6574\u4e2a INSERT\u3001UPDATE \u6216 DELETE \u8bed\u53e5\u6267\u884c\u4e4b\u540e\u89e6\u53d1\u3002<\/li>\n<\/ul>\n<p>\u8bed\u53e5\u7ea7\u89e6\u53d1\u5668\u7684\u4e3b\u8981\u7279\u70b9\u662f\u5b83\u4eec\u5728\u6574\u4e2a\u8bed\u53e5\u7684\u6267\u884c\u8fc7\u7a0b\u4e2d\u53ea\u6267\u884c\u4e00\u6b21\u3002\u5b83\u4eec\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee\u6216\u64cd\u4f5c\u5355\u4e2a\u884c\u7684\u6570\u636e\uff0c\u56e0\u4e3a\u5b83\u4eec\u5728\u6574\u4e2a\u8bed\u53e5\u7ea7\u522b\u4e0a\u6267\u884c\u3002\n<\/li>\n<\/ol>\n<p>\u6bcf\u79cd\u7c7b\u578b\u7684\u89e6\u53d1\u5668\u90fd\u6709\u5176\u7279\u5b9a\u7684\u7528\u9014\u548c\u9002\u7528\u573a\u666f\u3002\u5728\u8bbe\u8ba1\u89e6\u53d1\u5668\u65f6\uff0c\u9700\u8981\u6839\u636e\u4e1a\u52a1\u9700\u6c42\u9009\u62e9\u9002\u5f53\u7684\u89e6\u53d1\u5668\u7c7b\u578b\u3002\u884c\u7ea7\u89e6\u53d1\u5668\u901a\u5e38\u7528\u4e8e\u5904\u7406\u6bcf\u4e00\u884c\u7684\u53d8\u5316\uff0c\u800c\u8bed\u53e5\u7ea7\u89e6\u53d1\u5668\u7528\u4e8e\u5904\u7406\u6574\u4e2a\u8bed\u53e5\u7684\u6267\u884c\u8fc7\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Oracle \u4e2d\uff0cPL\/SQL \u89e6\u53d1\u5668\u5206\u4e3a\u4e24\u79cd\u4e3b\u8981\u7c7b\u578b\uff1a\u884c\u7ea7\u89e6\u53d1\u5668\uff08Row-level triggers\uff09 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[120],"tags":[],"class_list":["post-15970","post","type-post","status-publish","format-standard","hentry","category-oracel"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/15970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/comments?post=15970"}],"version-history":[{"count":1,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/15970\/revisions"}],"predecessor-version":[{"id":15971,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/15970\/revisions\/15971"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=15970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=15970"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=15970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}