{"id":3354,"date":"2021-01-12T10:02:46","date_gmt":"2021-01-12T02:02:46","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=3354"},"modified":"2021-07-15T16:54:47","modified_gmt":"2021-07-15T08:54:47","slug":"gbase-8a%e6%88%aa%e5%8f%96%e5%ad%97%e7%ac%a6%e4%b8%b2%e5%87%bd%e6%95%b0substr%e3%80%81substring%e4%bb%8b%e7%bb%8d%e5%92%8c%e6%a0%b7%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/3354","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u622a\u53d6\u5b57\u7b26\u4e32\u51fd\u6570substr\u3001substring\u3001MID\u4ecb\u7ecd\u548c\u6837\u4f8b"},"content":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecdGBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u91cc\uff0c\u7528\u4e8e\u622a\u53d6\u5b57\u7b26\u4e32\u7684\u51fd\u6570substr\uff0csubstring\u3001MID\u7684\u8bed\u6cd5\u548c\u6837\u4f8b\uff0c\u540c\u65f6\u4e5f\u5bf9\u76f8\u5173\u7684\u51fd\u6570\u505a\u4ecb\u7ecd\uff0c\u4ee5\u4fbf\u5b9e\u73b0\u622a\u53d6\u6307\u5b9a\u4f4d\u7f6e\uff0c\u6307\u5b9a\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\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-6a2a9aea9655d\" 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-6a2a9aea9655d\"  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\/3354\/#%E8%AF%AD%E6%B3%95\" >\u8bed\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\/3354\/#%E8%AF%B4%E6%98%8E\" >\u8bf4\u660e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%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-4\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E6%88%AA%E5%8F%96%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%88%B0%E6%9C%AB%E5%B0%BE\" >\u622a\u53d6\u5b57\u7b26\u4e32\u5230\u672b\u5c3e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E6%88%AA%E5%8F%96%E6%8C%87%E5%AE%9A%E9%95%BF%E5%BA%A6\" >\u622a\u53d6\u6307\u5b9a\u957f\u5ea6<\/a><\/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\/3354\/#%E8%B5%B7%E5%A7%8B%E4%BD%8D%E7%BD%AE%E4%B8%BA0\" >\u8d77\u59cb\u4f4d\u7f6e\u4e3a0<\/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\/3354\/#%E8%B5%B7%E5%A7%8B%E4%BD%8D%E7%BD%AE%E8%B6%85%E8%BF%87%E9%95%BF%E5%BA%A6%E6%9C%80%E5%A4%A7%E5%80%BC\" >\u8d77\u59cb\u4f4d\u7f6e\u8d85\u8fc7\u957f\u5ea6\u6700\u5927\u503c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E8%B5%B7%E5%A7%8B%E4%BD%8D%E7%BD%AE%E4%B8%BA%E8%B4%9F%E6%95%B0\" >\u8d77\u59cb\u4f4d\u7f6e\u4e3a\u8d1f\u6570<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E9%95%BF%E5%BA%A6%E8%B6%85%E8%BF%87%E6%9C%80%E5%A4%A7%E5%80%BC\" >\u957f\u5ea6\u8d85\u8fc7\u6700\u5927\u503c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E9%95%BF%E5%BA%A6%E4%B8%BA0\" >\u957f\u5ea6\u4e3a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E9%95%BF%E5%BA%A6%E4%B8%BA%E8%B4%9F%E6%95%B0\" >\u957f\u5ea6\u4e3a\u8d1f\u6570<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E5%8F%82%E6%95%B0%E4%B8%BANULL\" >\u53c2\u6570\u4e3aNULL<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#MID%E5%87%BD%E6%95%B0\" >MID\u51fd\u6570<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.gbase8.cn\/en\/3354\/#%E5%8F%82%E8%80%83\" >\u53c2\u8003<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%AF%AD%E6%B3%95\"><\/span>\u8bed\u6cd5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5176\u4e2dsubstr\u662fsubstring\u7684\u7f29\u5199\u5f62\u5f0f\uff0c\u65e0\u4efb\u4f55\u533a\u522b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SUBSTR(str,pos)\nSUBSTR(str,pos,len)\nSUBSTRING(str,pos)\nSUBSTRING(str,pos,len)\nMID(str,pos,len)<\/code><\/pre>\n\n\n\n<p>str \u539f\u59cb\u5b57\u7b26\u4e32<br>pos \u8d77\u59cb\u4f4d\u7f6e\uff0c\u4ece1\u5f00\u59cb\uff0c\u4e5f\u5c31\u662f\u7b2c\u4e00\u4e2a\u5b57\u7b26\u5f00\u59cb\uff0c\u53c2\u6570\u5c31\u662f1\u3002<br>len \u622a\u53d6\u6307\u5b9a\u957f\u5ea6<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%AF%B4%E6%98%8E\"><\/span>\u8bf4\u660e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6ca1\u6709 len \u53c2\u6570\u7684 SUBSTR()\u51fd\u6570\u4ece\u5b57\u7b26\u4e32 str \u7684 pos \u4f4d\u7f6e\u8fd4\u56de\u5269\u4f59\u5168\u90e8\u5b50\u4e32\u3002<\/li><li>\u5e26\u6709 len \u53c2\u6570\u7684 SUBSTR()\u51fd\u6570\u4ece\u5b57\u7b26\u4e32 str \u7684 pos \u4f4d\u7f6e\u8d77\u8fd4\u56de len \u4e2a\u5b57\u7b26\u7684\u5b50\u4e32\u3002<\/li><li>pos \u53ef\u4ee5\u662f\u8d1f\u503c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5b50\u4e32\u7684\u8d77\u59cb\u4f4d\u7f6e\u662f\u4ece\u5b57\u7b26\u4e32\u7684\u5c3e\u90e8\u5411\u524d\u7684pos \u4f4d\u7f6e\u3002<\/li><li>\u5982\u679c len \u4e3a\u5c0f\u4e8e 1 \u7684\u503c\uff0c\u8fd4\u56de\u7ed3\u679c\u59cb\u7ec8\u4e3a\u7a7a\u4e32\u3002<\/li><\/ul>\n\n\n\n<p>MID\u7b49\u540c\u4e8eSUBSTRING(str,pos,len)<\/p>\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=\"%E6%88%AA%E5%8F%96%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%88%B0%E6%9C%AB%E5%B0%BE\"><\/span>\u622a\u53d6\u5b57\u7b26\u4e32\u5230\u672b\u5c3e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u53ea\u6307\u5b9a\u4e86\u5f00\u59cb\u4f4d\u7f6e\uff0c\u622a\u53d6\u5230\u5b57\u7b26\u4e32\u672b\u5c3e\u3002\u540c\u65f6substring\u548csubstr\u662f\u5b8c\u5168\u4e00\u6837\u7684\uff0c\u540e\u7eed\u6837\u4f8b\u4ee5substr\u4e3a\u4f8b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substring('abcdefghijk',8);\n+----------------------------+\n| substring('abcdefghijk',8) |\n+----------------------------+\n| hijk                       |\n+----------------------------+\n1 row in set (Elapsed: 00:00:00.01)\n\ngbase&gt; select substr('abcdefghijk',8);\n+-------------------------+\n| substr('abcdefghijk',8) |\n+-------------------------+\n| hijk                    |\n+-------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<p>\u6570\u5b57\u5b57\u7b26\u4e32\u66f4\u6e05\u6670\u7684\u770b\u5230\u8d77\u59cb\u4f4d\u7f6e\u4ece1\u5f00\u59cb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',8);\n+------------------------+\n| substr('1234567890',8) |\n+------------------------+\n| 890                    |\n+------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; select substring('1234567890',8);\n+---------------------------+\n| substring('1234567890',8) |\n+---------------------------+\n| 890                       |\n+---------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%88%AA%E5%8F%96%E6%8C%87%E5%AE%9A%E9%95%BF%E5%BA%A6\"><\/span>\u622a\u53d6\u6307\u5b9a\u957f\u5ea6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5982\u4e0b\u6837\u4f8b\u6307\u5b9a\u53ea\u8bfb\u53d6\u4ece\u5f00\u59cb\u4f4d\u7f6e\u540e\u76842\u4e2a\u5b57\u7b26\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',8,2);\n+--------------------------+\n| substr('1234567890',8,2) |\n+--------------------------+\n| 89                       |\n+--------------------------+\n1 row in set (Elapsed: 00:00:00.00)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%B5%B7%E5%A7%8B%E4%BD%8D%E7%BD%AE%E4%B8%BA0\"><\/span>\u8d77\u59cb\u4f4d\u7f6e\u4e3a0<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u4f4d\u7f6e0\u548c\u4f4d\u7f6e1\u8fd4\u56de\u76f8\u540c\u7684\u7ed3\u679c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',0,2);\n+--------------------------+\n| substr('1234567890',0,2) |\n+--------------------------+\n| 12                       |\n+--------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; select substr('1234567890',1,2);\n+--------------------------+\n| substr('1234567890',1,2) |\n+--------------------------+\n| 12                       |\n+--------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%B5%B7%E5%A7%8B%E4%BD%8D%E7%BD%AE%E8%B6%85%E8%BF%87%E9%95%BF%E5%BA%A6%E6%9C%80%E5%A4%A7%E5%80%BC\"><\/span>\u8d77\u59cb\u4f4d\u7f6e\u8d85\u8fc7\u957f\u5ea6\u6700\u5927\u503c<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u8fd4\u56de\u7a7a\u5b57\u7b26\u4e32<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',100,2);\n+----------------------------+\n| substr('1234567890',100,2) |\n+----------------------------+\n|                            |\n+----------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%B5%B7%E5%A7%8B%E4%BD%8D%E7%BD%AE%E4%B8%BA%E8%B4%9F%E6%95%B0\"><\/span>\u8d77\u59cb\u4f4d\u7f6e\u4e3a\u8d1f\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u4ece\u5c3e\u90e8\u5f00\u59cb\uff0c\u53cd\u5411\u8ba1\u7b97\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',-1,2);\n+---------------------------+\n| substr('1234567890',-1,2) |\n+---------------------------+\n| 0                         |\n+---------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; select substr('1234567890',-2,2);\n+---------------------------+\n| substr('1234567890',-2,2) |\n+---------------------------+\n| 90                        |\n+---------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; select substr('1234567890',-3,2);\n+---------------------------+\n| substr('1234567890',-3,2) |\n+---------------------------+\n| 89                        |\n+---------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<p>\u7b49\u540c\u4e8e\u4ecelength(str)+1\u5f00\u59cb\u3002\u6bd4\u5982-1\u7b49\u540c\u4e8e(length(str)+1) -1\u3002\u5bf9\u6bd4\u4e00\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; set @str='1234567890';\nQuery OK, 0 rows affected (Elapsed: 00:00:00.00)\n\ngbase&gt; select @str,substr(@str,-2,2),substr(@str,(length(@str)+1)-2,2);\n+------------+-------------------+-----------------------------------+\n| @str       | substr(@str,-2,2) | substr(@str,(length(@str)+1)-2,2) |\n+------------+-------------------+-----------------------------------+\n| 1234567890 | 90                | 90                                |\n+------------+-------------------+-----------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%95%BF%E5%BA%A6%E8%B6%85%E8%BF%87%E6%9C%80%E5%A4%A7%E5%80%BC\"><\/span>\u957f\u5ea6\u8d85\u8fc7\u6700\u5927\u503c<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u8d85\u8fc7\u672b\u5c3e\u7684\u957f\u5ea6\uff0c\u6700\u7ec8\u662f\u8fd4\u56de\u5230\u672b\u5c3e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',10,20);\n+----------------------------+\n| substr('1234567890',10,20) |\n+----------------------------+\n| 0                          |\n+----------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%95%BF%E5%BA%A6%E4%B8%BA0\"><\/span>\u957f\u5ea6\u4e3a0<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u957f\u5ea6\u4e3a0\u65f6\uff0c\u8fd4\u56de\u7a7a\u5b57\u7b26\u4e32\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',10,0);\n+---------------------------+\n| substr('1234567890',10,0) |\n+---------------------------+\n|                           |\n+---------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%95%BF%E5%BA%A6%E4%B8%BA%E8%B4%9F%E6%95%B0\"><\/span>\u957f\u5ea6\u4e3a\u8d1f\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\ngbase&gt; select substr('1234567890',10,-2);\n+----------------------------+\n| substr('1234567890',10,-2) |\n+----------------------------+\n|                            |\n+----------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E6%95%B0%E4%B8%BANULL\"><\/span>\u53c2\u6570\u4e3aNULL<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u65e0\u8bba\u662f\u539f\u59cb\u5b57\u7b26\u4e32\uff0c\u8fd8\u662f\u8d77\u59cb\u4f4d\u7f6e\uff0c\u957f\u5ea6\uff0c\u4efb\u4f55\u4e00\u4e2a\u4e3anull,\u5219\u8fd4\u56denull.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase&gt; select substr('1234567890',10,null);\n+------------------------------+\n| substr('1234567890',10,null) |\n+------------------------------+\n| NULL                         |\n+------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; select substr('1234567890',null,-2);\n+------------------------------+\n| substr('1234567890',null,-2) |\n+------------------------------+\n| NULL                         |\n+------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; select substr(null,10,-2);\n+--------------------+\n| substr(null,10,-2) |\n+--------------------+\n| NULL               |\n+--------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"MID%E5%87%BD%E6%95%B0\"><\/span>MID\u51fd\u6570<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u548csubstring(str,pos,len)\u5b8c\u5168\u4e00\u6837\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> select mid('12345678',3,4);\r\n+---------------------+\r\n| mid('12345678',3,4) |\r\n+---------------------+\r\n| 3456                |\r\n+---------------------+\r\n1 row in set (Elapsed: 00:00:00.00)\r\n\r\ngbase> select substring('12345678',3,4);\r\n+---------------------------+\r\n| substring('12345678',3,4) |\r\n+---------------------------+\r\n| 3456                      |\r\n+---------------------------+\r\n1 row in set (Elapsed: 00:00:00.00)\r\n\r\ngbase>\r\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83\"><\/span>\u53c2\u8003<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.gbase8.cn\/en\/2672\/\">GBase 8a\u5b57\u7b26\u4e32\u548c\u65e5\u671f\u51fd\u6570\u5217\u8868\u7d22\u5f15<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecdGBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u91cc\uff0c\u7528\u4e8e\u622a\u53d6\u5b57\u7b26\u4e32\u7684\u51fd\u6570substr\uff0csubstring\u3001MID\u7684\u8bed\u6cd5\u548c\u6837\u4f8b\uff0c\u540c\u65f6\u4e5f\u5bf9\u76f8\u5173\u7684\u51fd\u6570\u505a\u4ecb\u7ecd\uff0c\u4ee5\u4fbf\u5b9e\u73b0\u622a\u53d6\u6307\u5b9a\u4f4d\u7f6e\uff0c\u6307\u5b9a\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\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":[36],"class_list":["post-3354","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-36"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/3354","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=3354"}],"version-history":[{"count":8,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/3354\/revisions"}],"predecessor-version":[{"id":7461,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/3354\/revisions\/7461"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=3354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=3354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=3354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}