{"id":5968,"date":"2024-11-14T13:19:39","date_gmt":"2024-11-14T05:19:39","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5968\/"},"modified":"2024-11-14T13:19:39","modified_gmt":"2024-11-14T05:19:39","slug":"sql-plus%e6%80%8e%e4%b9%88%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5968\/","title":{"rendered":"sql\u00a0plus\u600e\u4e48\u7528"},"content":{"rendered":"<blockquote><p>\n  sql*plus \u662f\u4e00\u6b3e\u7528\u4e8e\u4e0e oracle \u6570\u636e\u5e93\u4ea4\u4e92\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u4e3b\u8981\u529f\u80fd\u5305\u62ec\u6267\u884c sql \u8bed\u53e5\u3001\u67e5\u8be2\u6570\u636e\u3001\u521b\u5efa\u8868\u548c\u7ba1\u7406\u7528\u6237\u3002\u5b83\u6613\u4e8e\u4f7f\u7528\u3001\u8de8\u5e73\u53f0\u517c\u5bb9\uff0c\u5e76\u63d0\u4f9b\u5bf9 oracle \u6570\u636e\u5e93\u7684\u5f3a\u5927\u8bbf\u95ee\u6743\u9650\uff0c\u4f46\u4ec5\u9650\u4e8e\u547d\u4ee4\u884c\u754c\u9762\u4e14\u7f3a\u4e4f\u56fe\u5f62\u7528\u6237\u754c\u9762\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/12\/2024061203032169472.jpg\" class=\"aligncenter\" title=\"sql\u00a0plus\u600e\u4e48\u7528\u63d2\u56fe\" alt=\"sql\u00a0plus\u600e\u4e48\u7528\u63d2\u56fe\" \/><\/p>\n<p><strong>SQL*Plus\uff1a\u5165\u95e8\u6307\u5357<\/strong><\/p>\n<p><strong>\u4ec0\u4e48\u662f SQL*Plus\uff1f<\/strong><\/p>\n<p>SQL*Plus \u662f\u4e00\u6b3e\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u4e0e Oracle \u6570\u636e\u5e93\u4ea4\u4e92\u3002\u5b83\u5141\u8bb8\u7528\u6237\u6267\u884c SQL \u8bed\u53e5\u3001\u67e5\u8be2\u6570\u636e\u548c\u7ba1\u7406\u6570\u636e\u5e93\u5bf9\u8c61\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528 SQL*Plus<\/strong><\/p>\n<ol>\n<li> <strong>\u542f\u52a8 SQL*Plus\uff1a<\/strong>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u7a97\u53e3\u4e2d\u8f93\u5165 &#8220;sqlplus&#8221; \u547d\u4ee4\u3002<\/li>\n<li> <strong>\u8fde\u63a5\u5230\u6570\u636e\u5e93\uff1a<\/strong>\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u8fde\u63a5\u5230\u6570\u636e\u5e93\uff1a&#8221;connect username\/password@host:port\/database_name&#8221;\u3002\u66ff\u6362\u4e3a\u5b9e\u9645\u7684\u7528\u6237\u540d\u3001\u5bc6\u7801\u3001\u4e3b\u673a\u3001\u7aef\u53e3\u548c\u6570\u636e\u5e93\u540d\u3002<\/li>\n<li> <strong>\u6267\u884c SQL \u8bed\u53e5\uff1a<\/strong>\u5728 SQL*Plus \u63d0\u793a\u7b26 (SQL&gt; ) \u540e\u8f93\u5165 SQL \u8bed\u53e5\uff0c\u7136\u540e\u6309 Enter\u3002<\/li>\n<li> <strong>\u9000\u51fa SQL*Plus\uff1a<\/strong>\u8f93\u5165 &#8220;exit&#8221; \u547d\u4ee4\u5e76\u6309 Enter\u3002<\/li>\n<\/ol>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong><\/p>\n<ul>\n<li>\u6267\u884c SQL \u8bed\u53e5<\/li>\n<li>\u67e5\u8be2\u548c\u68c0\u7d22\u6570\u636e<\/li>\n<li>\u521b\u5efa\u548c\u4fee\u6539\u8868\u3001\u89c6\u56fe\u548c\u8fc7\u7a0b<\/li>\n<li>\u7ba1\u7406\u7528\u6237\u548c\u6743\u9650<\/li>\n<li>\u5bfc\u5165\u548c\u5bfc\u51fa\u6570\u636e<\/li>\n<li>\u7f16\u8f91\u548c\u683c\u5f0f\u5316\u67e5\u8be2\u7ed3\u679c<\/li>\n<\/ul>\n<p><strong>\u4f18\u70b9<\/strong><\/p>\n<ul>\n<li>\u6613\u4e8e\u4f7f\u7528\u548c\u5b66\u4e60<\/li>\n<li>\u8de8\u5e73\u53f0\u517c\u5bb9<\/li>\n<li>\u514d\u8d39\u4f7f\u7528<\/li>\n<li>\u63d0\u4f9b\u5bf9 Oracle \u6570\u636e\u5e93\u7684\u5f3a\u5927\u8bbf\u95ee\u6743\u9650<\/li>\n<\/ul>\n<p><strong>\u7f3a\u70b9<\/strong><\/p>\n<ul>\n<li>\u4ec5\u9650\u547d\u4ee4\u884c\u754c\u9762<\/li>\n<li>\u4e0d\u80fd\u6267\u884c\u67d0\u4e9b\u9ad8\u7ea7\u7ba1\u7406\u4efb\u52a1<\/li>\n<li>\u7f3a\u4e4f\u56fe\u5f62\u7528\u6237\u754c\u9762<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u63d0\u793a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528 &#8220;help&#8221; \u547d\u4ee4\u83b7\u53d6\u6709\u5173\u7279\u5b9a\u547d\u4ee4\u7684\u5e2e\u52a9\u3002<\/li>\n<li>\u4f7f\u7528 &#8220;tab&#8221; \u952e\u81ea\u52a8\u5b8c\u6210\u547d\u4ee4\u548c\u8868\u540d\u3002<\/li>\n<li>\u4f7f\u7528 &#8220;spool off&#8221; \u548c &#8220;spool on&#8221; \u547d\u4ee4\u5c06\u67e5\u8be2\u7ed3\u679c\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002<\/li>\n<li>\u4f7f\u7528 &#8220;set linesize&#8221; \u547d\u4ee4\u8c03\u6574\u67e5\u8be2\u7ed3\u679c\u7684\u5bbd\u5ea6\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fsql&nbsp;plus\u600e\u4e48\u7528\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sql*plus \u662f\u4e00\u6b3e\u7528\u4e8e\u4e0e oracle \u6570\u636e\u5e93\u4ea4\u4e92\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u4e3b\u8981\u529f\u80fd\u5305\u62ec\u6267\u884c sql \u8bed\u53e5\u3001\u67e5\u8be2\u6570\u636e\u3001\u521b\u5efa\u8868\u548c\u7ba1\u7406\u7528\u6237\u3002\u5b83\u6613\u4e8e\u4f7f\u7528\u3001\u8de8\u5e73\u53f0\u517c\u5bb9\uff0c\u5e76\u63d0\u4f9b\u5bf9 oracle \u6570\u636e\u5e93\u7684\u5f3a\u5927\u8bbf\u95ee\u6743\u9650\uff0c\u4f46\u4ec5\u9650\u4e8e\u547d\u4ee4\u884c\u754c\u9762\u4e14\u7f3a\u4e4f\u56fe\u5f62\u7528\u6237\u754c\u9762\u3002 SQL*Plus\uff1a\u5165\u95e8\u6307\u5357 \u4ec0\u4e48\u662f SQL*Plus\uff1f SQL*Plus \u662f\u4e00\u6b3e\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u4e0e Oracle \u6570\u636e\u5e93\u4ea4\u4e92\u3002\u5b83\u5141\u8bb8\u7528\u6237\u6267\u884c SQL \u8bed\u53e5\u3001\u67e5\u8be2\u6570\u636e\u548c\u7ba1\u7406\u6570\u636e\u5e93\u5bf9\u8c61\u3002 \u5982\u4f55\u4f7f\u7528 SQL*Plus \u542f\u52a8 SQL*Plus\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u7a97\u53e3\u4e2d\u8f93\u5165 &#8220;sqlplus&#8221; \u547d\u4ee4\u3002 \u8fde\u63a5\u5230\u6570\u636e\u5e93\uff1a\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u8fde\u63a5\u5230\u6570\u636e\u5e93\uff1a&#8221;connect username\/password@host:port\/database_name&#8221;\u3002\u66ff\u6362\u4e3a\u5b9e\u9645\u7684\u7528\u6237\u540d\u3001\u5bc6\u7801\u3001\u4e3b\u673a\u3001\u7aef\u53e3\u548c\u6570\u636e\u5e93\u540d\u3002 \u6267\u884c SQL \u8bed\u53e5\uff1a\u5728 SQL*Plus \u63d0\u793a\u7b26 (SQL&gt; ) \u540e\u8f93\u5165 SQL \u8bed\u53e5\uff0c\u7136\u540e\u6309 Enter\u3002 \u9000\u51fa SQL*Plus\uff1a\u8f93\u5165 &#8220;exit&#8221; \u547d\u4ee4\u5e76\u6309 Enter\u3002 \u4e3b\u8981\u529f\u80fd \u6267\u884c SQL \u8bed\u53e5 \u67e5\u8be2\u548c\u68c0\u7d22\u6570\u636e \u521b\u5efa\u548c\u4fee\u6539\u8868\u3001\u89c6\u56fe\u548c\u8fc7\u7a0b \u7ba1\u7406\u7528\u6237\u548c\u6743\u9650 \u5bfc\u5165\u548c\u5bfc\u51fa\u6570\u636e \u7f16\u8f91\u548c\u683c\u5f0f\u5316\u67e5\u8be2\u7ed3\u679c \u4f18\u70b9 \u6613\u4e8e\u4f7f\u7528\u548c\u5b66\u4e60 \u8de8\u5e73\u53f0\u517c\u5bb9 \u514d\u8d39\u4f7f\u7528 \u63d0\u4f9b\u5bf9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5968","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=5968"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5968\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}