{"id":5096,"date":"2021-03-11T13:17:58","date_gmt":"2021-03-11T05:17:58","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=5096"},"modified":"2021-03-12T12:38:57","modified_gmt":"2021-03-12T04:38:57","slug":"gbase-8a%e6%95%b0%e6%8d%ae%e5%ba%93%e5%91%bd%e4%bb%a4%e8%ae%be%e7%bd%ae%e7%bb%93%e6%9d%9f%e7%ac%a6%ef%bc%8c%e5%88%86%e9%9a%94%e7%ac%a6%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/5096","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u6570\u636e\u5e93\u547d\u4ee4\u8bbe\u7f6e\u7ed3\u675f\u7b26\uff0c\u5206\u9694\u7b26\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u5728GBase 8a\u6570\u636e\u5e93\u91cc\uff0c\u9ed8\u8ba4\u91c7\u7528\u5206\u53f7\u4f5c\u4e3a\u8bed\u53e5\u7684\u7ed3\u675f\u7b26\uff0c\u4ee5\u53ca\u591a\u4e2a\u8bed\u53e5\u95f4\u7684\u5206\u5272\u7b26\uff0c\u672c\u6587\u4ecb\u7ecd\u5176\u4f7f\u7528\u548c\u4fee\u6539\u65b9\u6cd5\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2d50cca24ea\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2d50cca24ea\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/5096\/#%E4%BF%AE%E6%94%B9%E6%96%B9%E6%B3%95\" >\u4fee\u6539\u65b9\u6cd5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/5096\/#%E6%A0%B7%E4%BE%8B\" >\u6837\u4f8b<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/5096\/#%E5%8D%95%E4%B8%AASQL\" >\u5355\u4e2aSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/5096\/#%E5%91%BD%E4%BB%A4%E8%A1%8C%E4%BA%A4%E4%BA%92%E6%A8%A1%E5%BC%8F\" >\u547d\u4ee4\u884c\u4ea4\u4e92\u6a21\u5f0f<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/5096\/#%E6%89%B9%E9%87%8F%E6%A8%A1%E5%BC%8F%E6%88%96%E5%BC%80%E5%8F%91%E6%8E%A5%E5%8F%A3\" >\u6279\u91cf\u6a21\u5f0f\u6216\u5f00\u53d1\u63a5\u53e3<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/5096\/#%E5%A4%9A%E4%B8%AA%E7%8B%AC%E7%AB%8BSQL\" >\u591a\u4e2a\u72ec\u7acbSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.gbase8.cn\/en\/5096\/#%E5%85%B3%E8%81%94SQL%EF%BC%88%E8%87%AA%E5%AE%9A%E4%B9%89%E5%87%BD%E6%95%B0%E5%92%8C%E5%AD%98%E5%82%A8%E8%BF%87%E7%A8%8B\" >\u5173\u8054SQL\uff08\u81ea\u5b9a\u4e49\u51fd\u6570\u548c\u5b58\u50a8\u8fc7\u7a0b)<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BF%AE%E6%94%B9%E6%96%B9%E6%B3%95\"><\/span>\u4fee\u6539\u65b9\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>delimiter &lt;NEWSIGN&gt;<\/code><\/pre>\n\n\n\n<p>\u6bd4\u5982\uff0c\u5f53\u524d\u5206\u5272\u7b26\u662f\u9017\u53f7\uff0c\u8981\u6539\u6210\u4e24\u4e2a\u5de6\u659c\u6760 \/\/\u3002\u4fee\u6539\u540e\uff0cSQL\u8bed\u53e5\u5c06\u4f1a\u628a\u4e0b\u4e00\u4e2a\u5206\u9694\u7b26\u4e4b\u524d\u7684\u6240\u6709\u5185\u5bb9\uff0c\u4f5c\u4e3a\u4e00\u4e2aSQL\u8fdb\u884c\u89e3\u6790\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select now();\n+---------------------+\n| now()               |\n+---------------------+\n| 2021-03-09 09:49:17 |\n+---------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; delimiter \/\/\ngbase&gt; select now();\n    -&gt; \/\/\n+---------------------+\n| now()               |\n+---------------------+\n| 2021-03-09 09:49:28 |\n+---------------------+\n1 row in set (Elapsed: 00:00:00.01)\n\ngbase&gt; delimiter ;\ngbase&gt; select now();\/\/\n+---------------------+\n| now()               |\n+---------------------+\n| 2021-03-09 09:49:42 |\n+---------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\n    -&gt; ;\nERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your GBase server version for the right syntax to use near '\/\/' at line 1\ngbase&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A0%B7%E4%BE%8B\"><\/span>\u6837\u4f8b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8D%95%E4%B8%AASQL\"><\/span>\u5355\u4e2aSQL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5728\u547d\u4ee4\u884c\u4ea4\u4e92\u6a21\u5f0f\uff0c\u5fc5\u987b\u8f93\u5165\u7ed3\u675f\u7b26\u6216\u5206\u9694\u7b26\uff0c\u624d\u4f1a\u6267\u884cSQL\uff0c\u5728\u5f00\u53d1\u63a5\u53e3\uff0c\u6bd4\u5982JDBC,ODBC\u91cc\uff0c\u6267\u884c\u5355\u4e2aSQL\u662f\u5fc5\u987b\u8981\u8f93\u5165\u7684\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%91%BD%E4%BB%A4%E8%A1%8C%E4%BA%A4%E4%BA%92%E6%A8%A1%E5%BC%8F\"><\/span>\u547d\u4ee4\u884c\u4ea4\u4e92\u6a21\u5f0f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5982\u679c\u91c7\u7528\u4ea4\u4e92\u6a21\u5f0f\uff0c\u6bd4\u5982\u547d\u4ee4\u884c\u5ba2\u6237\u7aef\uff0c\u5219\u5fc5\u987b\u8f93\u5165\u7ed3\u675f\u7b26\uff0c\u624d\u4f1a\u53d1\u9001\u5230\u670d\u52a1\u5668\u7aef\u6267\u884c\uff0c\u6bd4\u5982<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select\n    -&gt; now()\n    -&gt; from\n    -&gt; dual\n    -&gt;\n    -&gt;\n    -&gt;\n    -&gt; ;\n+---------------------+\n| now()               |\n+---------------------+\n| 2021-03-09 09:41:12 |\n+---------------------+\n1 row in set (Elapsed: 00:00:00.34)\n<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u4e0d\u8f93\u5165\u7ed3\u675f\u7b26\uff0c\u5219\u4f1a\u4e00\u76f4\u7b49\u5f85\u8f93\u5165\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%89%B9%E9%87%8F%E6%A8%A1%E5%BC%8F%E6%88%96%E5%BC%80%E5%8F%91%E6%8E%A5%E5%8F%A3\"><\/span>\u6279\u91cf\u6a21\u5f0f\u6216\u5f00\u53d1\u63a5\u53e3<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>\u6bd4\u5982\u5728\u547d\u4ee4\u5c06\u4f7f\u7528-e\u6267\u884c\uff0c\u5219\u4e0d\u9700\u8981\u8f93\u5165\u5206\u9694\u7b26\u3002\u5f53\u7136\u52a0\u4e0a\u5206\u9694\u7b26\u4e5f\u4e0d\u4f1a\u62a5\u9519\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@gbase_rh7_001 ~]$ gccli -e\"select now() from dual\"\n+---------------------+\n| now()               |\n+---------------------+\n| 2021-03-09 09:44:17 |\n+---------------------+\n&#91;gbase@gbase_rh7_001 ~]$ gccli -e\"select now() from dual;\"\n+---------------------+\n| now()               |\n+---------------------+\n| 2021-03-09 09:44:21 |\n+---------------------+\n&#91;gbase@gbase_rh7_001 ~]$\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%A4%9A%E4%B8%AA%E7%8B%AC%E7%AB%8BSQL\"><\/span>\u591a\u4e2a\u72ec\u7acbSQL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u591a\u4e2a\u72ec\u7acb\u7684SQL\u5404\u81ea\u6267\u884c\uff0c\u5219\u5fc5\u987b\u8981\u5728SQL\u4e2d\u95f4\u52a0\u4e0a\u5206\u9694\u7b26\u3002\u6bd4\u5982<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@gbase_rh7_001 ~]$ gccli -e\"select now() from dual;select 1234;\"\n+---------------------+\n| now()               |\n+---------------------+\n| 2021-03-09 09:46:02 |\n+---------------------+\n+------+\n| 1234 |\n+------+\n| 1234 |\n+------+\n&#91;gbase@gbase_rh7_001 ~]$\n<\/code><\/pre>\n\n\n\n<p>\u5982\u4e0a2\u4e2aSQL\u5404\u81ea\u6267\u884c\uff0c\u5206\u522b\u8f93\u51fa\u7ed3\u679c\uff0c\u6ca1\u6709\u4efb\u4f55\u5173\u8054\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%85%B3%E8%81%94SQL%EF%BC%88%E8%87%AA%E5%AE%9A%E4%B9%89%E5%87%BD%E6%95%B0%E5%92%8C%E5%AD%98%E5%82%A8%E8%BF%87%E7%A8%8B\"><\/span>\u5173\u8054SQL\uff08\u81ea\u5b9a\u4e49\u51fd\u6570\u548c\u5b58\u50a8\u8fc7\u7a0b)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u6b64\u65f6\u9700\u8981\u4e00\u4e2a\u65b0\u7684\u5206\u9694\u7b26\uff0c\u6765\u8868\u793a2\u4e2a\u5206\u9694\u7b26\u4e4b\u95f4\u7684SQL,\u662f\u4e00\u4e2a\u6574\u4f53\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>delimiter \/\/\nXXXXXX;\nXXXXXXXXX\nXXXXXXXXXXXXXXX\nXXXX \/\/<\/code><\/pre>\n\n\n\n<p>\u4e00\u4e2a\u5b58\u50a8\u8fc7\u7a0b\u7684\u6837\u4f8b\u8bf7\u53c2\u8003 <a href=\"https:\/\/www.gbase8.cn\/en\/226\/\">GBase 8a\u96c6\u7fa4\u5b58\u50a8\u8fc7\u7a0b\u6837\u4f8b\uff0c\u52a8\u6001\u5b58\u50a8\u8fc7\u7a0b<\/a><\/p>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>\u5728GBase 8a\u6570\u636e\u5e93\u91cc\uff0c\u9ed8\u8ba4\u91c7\u7528\u5206\u53f7\u4f5c\u4e3a\u8bed\u53e5\u7684\u7ed3\u675f\u7b26\uff0c\u4ee5\u53ca\u591a\u4e2a\u8bed\u53e5\u95f4\u7684\u5206\u5272\u7b26\uff0c\u672c\u6587\u4ecb\u7ecd\u5176\u4f7f\u7528\u548c\u4fee\u6539\u65b9\u6cd5\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-5096","post","type-post","status-publish","format-standard","hentry","category-gbase8a"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/5096","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=5096"}],"version-history":[{"count":3,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/5096\/revisions"}],"predecessor-version":[{"id":5110,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/5096\/revisions\/5110"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=5096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=5096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=5096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}