{"id":15444,"date":"2023-12-04T20:11:18","date_gmt":"2023-12-04T12:11:18","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=15444"},"modified":"2023-12-04T20:12:08","modified_gmt":"2023-12-04T12:12:08","slug":"oracle-zhong-plsql-zhong-de-functionprocedure-he-p","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/12\/04\/oracle-zhong-plsql-zhong-de-functionprocedure-he-p\/","title":{"rendered":"Oracle \u4e2d PLSQL \u4e2d\u7684 FUNCTION\uff0cPROCEDURE \u548c PACKAGE \u6709\u4ec0\u4e48\u533a\u522b\uff1f"},"content":{"rendered":"<p>\u5728 Oracle \u7684 PL\/SQL \u4e2d\uff0cFUNCTION\u3001PROCEDURE \u548c PACKAGE \u662f\u4e0d\u540c\u7684\u6570\u636e\u5e93\u5bf9\u8c61\uff0c\u5b83\u4eec\u6709\u7740\u4e0d\u540c\u7684\u4f5c\u7528\u548c\u7279\u70b9\uff1a<\/p>\n<ol>\n<li>\n<strong>FUNCTION\uff08\u51fd\u6570\uff09<\/strong>\uff1a<\/p>\n<ul>\n<li>\u662f\u4e00\u79cd PL\/SQL \u7a0b\u5e8f\u5355\u5143\uff0c\u53ef\u4ee5\u63a5\u6536\u53c2\u6570\u5e76\u8fd4\u56de\u4e00\u4e2a\u503c\u3002\u51fd\u6570\u7c7b\u4f3c\u4e8e\u5b50\u7a0b\u5e8f\uff0c\u5b83\u63a5\u53d7\u8f93\u5165\u53c2\u6570\u3001\u6267\u884c\u4e00\u5b9a\u7684\u903b\u8f91\u64cd\u4f5c\uff0c\u7136\u540e\u8fd4\u56de\u4e00\u4e2a\u503c\u7ed9\u8c03\u7528\u8005\u3002\u51fd\u6570\u5728 SQL \u67e5\u8be2\u4e2d\u53ef\u4ee5\u4f5c\u4e3a\u8868\u8fbe\u5f0f\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<strong>PROCEDURE\uff08\u8fc7\u7a0b\uff09<\/strong>\uff1a<\/p>\n<ul>\n<li>\u4e5f\u662f\u4e00\u79cd PL\/SQL \u7a0b\u5e8f\u5355\u5143\uff0c\u7528\u4e8e\u6267\u884c\u4e00\u7cfb\u5217\u64cd\u4f5c\uff0c\u53ef\u4ee5\u63a5\u6536\u53c2\u6570\u4f46\u4e0d\u8fd4\u56de\u4efb\u4f55\u503c\u3002\u8fc7\u7a0b\u53ef\u4ee5\u5b8c\u6210\u5404\u79cd\u4efb\u52a1\uff0c\u5b83\u53ef\u4ee5\u4fee\u6539\u6570\u636e\u3001\u6267\u884c\u4e1a\u52a1\u903b\u8f91\uff0c\u4f46\u901a\u5e38\u4e0d\u8fd4\u56de\u6570\u636e\u7ed9\u8c03\u7528\u8005\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<strong>PACKAGE\uff08\u5305\uff09<\/strong>\uff1a<\/p>\n<ul>\n<li>\u662f\u4e00\u79cd\u903b\u8f91\u4e0a\u7ec4\u7ec7\u548c\u5c01\u88c5\u591a\u4e2a\u51fd\u6570\u3001\u8fc7\u7a0b\u3001\u53d8\u91cf\u3001\u5e38\u91cf\u7b49 PL\/SQL \u5bf9\u8c61\u7684\u5bb9\u5668\u3002\u5b83\u5141\u8bb8\u5c06\u76f8\u5173\u8054\u7684\u529f\u80fd\u7ec4\u7ec7\u5728\u4e00\u8d77\uff0c\u63d0\u4f9b\u66f4\u597d\u7684\u6a21\u5757\u5316\u548c\u5c01\u88c5\u6027\uff0c\u6709\u52a9\u4e8e\u66f4\u597d\u5730\u7ec4\u7ec7\u548c\u7ba1\u7406\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u533a\u522b\u603b\u7ed3\uff1a<\/p>\n<ul>\n<li><strong>FUNCTION<\/strong> \u662f\u4e00\u4e2a\u80fd\u8fd4\u56de\u503c\u7684 PL\/SQL \u7a0b\u5e8f\u5355\u5143\uff0c\u7c7b\u4f3c\u4e8e\u5177\u6709\u8fd4\u56de\u503c\u7684\u5b50\u7a0b\u5e8f\u3002<\/li>\n<li><strong>PROCEDURE<\/strong> \u662f\u4e00\u4e2a\u4e0d\u8fd4\u56de\u503c\u7684 PL\/SQL \u7a0b\u5e8f\u5355\u5143\uff0c\u7c7b\u4f3c\u4e8e\u5b50\u7a0b\u5e8f\uff0c\u7528\u4e8e\u6267\u884c\u4e00\u7cfb\u5217\u64cd\u4f5c\u3002<\/li>\n<li><strong>PACKAGE<\/strong> \u662f\u7528\u4e8e\u7ec4\u7ec7\u591a\u4e2a\u76f8\u5173\u8054\u7684\u51fd\u6570\u3001\u8fc7\u7a0b\u548c\u53d8\u91cf\u7684\u5bb9\u5668\uff0c\u63d0\u4f9b\u6a21\u5757\u5316\u548c\u5c01\u88c5\u6027\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b PL\/SQL \u5bf9\u8c61\u5404\u81ea\u6709\u7740\u4e0d\u540c\u7684\u7528\u9014\u548c\u7279\u70b9\uff0c\u80fd\u591f\u6839\u636e\u9700\u6c42\u63d0\u4f9b\u7075\u6d3b\u800c\u5f3a\u5927\u7684\u7f16\u7a0b\u80fd\u529b\uff0c\u6709\u52a9\u4e8e\u5b9e\u73b0\u66f4\u6709\u6548\u7684\u6570\u636e\u5e93\u903b\u8f91\u548c\u4e1a\u52a1\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Oracle \u7684 PL\/SQL \u4e2d\uff0cFUNCTION\u3001PROCEDURE \u548c PACKAGE \u662f\u4e0d\u540c\u7684\u6570\u636e [&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-15444","post","type-post","status-publish","format-standard","hentry","category-oracel"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/15444","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=15444"}],"version-history":[{"count":1,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/15444\/revisions"}],"predecessor-version":[{"id":15445,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/15444\/revisions\/15445"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=15444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=15444"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=15444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}