{"id":293,"date":"2017-07-31T18:50:26","date_gmt":"2017-07-31T18:50:26","guid":{"rendered":"http:\/\/blog.yyhcw.com\/post\/293.html"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T07:54:17","slug":"","status":"publish","type":"post","link":"http:\/\/blog.yyhcw.com\/post\/293.html","title":{"rendered":"MYSQL\u5bfc\u51faExcel\u6570\u5b57\u907f\u514d\u8f6c\u4e3a\u79d1\u5b66\u8ba1\u6570\u6cd5\u65b9\u6cd5"},"content":{"rendered":"<!--wp-compress-html--><!--wp-compress-html no compression--><p>\u7ecf\u5e38\u9047\u5230MYSQL\u5bfc\u51fa\u957f\u6570\u5b57\u6216\u7eaf\u6570\u5b57\u5b57\u7b26\u4e32\uff08\u5982\u8eab\u4efd\u8bc1\u3001\u5361\u5238\u53f7\u3001\u6761\u7801\u3001\u6d41\u6c34\u53f7\u7b49\uff09\u5230csv\u6216excel\u6587\u4ef6\uff0c\u7528excel\u6253\u5f00\u4f1a\u663e\u793a\u4e3a\u79d1\u5b66\u8bb0\u6570\u6cd5\uff0c\u751a\u81f3\u540e\u51e0\u4f4d\u8f6c\u4e3a0\u3002\u8fd9\u662f\u7531Excel\u7684\u7279\u6027\u51b3\u5b9a\u7684\uff1aExcel\u663e\u793a11\u4f4d\u4ee5\u4e0a\u7684\u6570\u5b57\u65f6\uff0c\u4f1a\u81ea\u52a8\u8f6c\u5316\u4e3a\u79d1\u5b66\u8ba1\u6570\u6cd5\uff0c\u5982\u679c\u957f\u5ea6\u5927\u4e8e15\u4f4d\uff0c15\u4f4d\u4ee5\u540e\u6570\u5b57\u8fd8\u4f1a\u8f6c\u62100\u3002<\/p>\n<p>\u7f51\u4e0a\u641c\u5230\u7684\u89e3\u51b3\u529e\u6cd5\u662f\u5728\u8be5\u957f\u6570\u5b57\u524d\u589e\u52a0tab\u5b57\u7b26\uff1a<\/p>\n<p>\u5373\uff1a<\/p>\n<pre class=\"prism-highlight prism-language-sql\">CONCAT(&quot;\\t&quot;,str)<\/pre>\n<p>\u5176\u4e2d \\t \u4e3a\u5236\u8868\u7b26\uff08\u5373\u952e\u76d8\u4e0a\u7684Tab\u952e\uff09\u7684\u8f6c\u4e49\u7b26<\/p>\n<p>\u5b9e\u8df5\u65f6\u53d1\u73b0\u6309\u6b64\u65b9\u6cd5\u5bfc\u51fa\u7684\u6587\u4ef6\u6253\u5f00\u540e\u867d\u7136\u663e\u793a\u4e3a\u6587\u672c\u5b57\u7b26\uff0c\u4f46\u957f\u5ea6\u591a\u4e861\uff0c\u5728\u5b57\u7b26\u524d\u591a\u4e86\u4e00\u4e2a\u4e0d\u53ef\u89c1\u7a7a\u683c\uff08\u5236\u8868\u7b26\uff09\uff0c\u5220\u6389\u624d\u662f\u539f\u6765\u7684\u5b57\u7b26\u3002<\/p>\n<p>\u5982\u679c\u53ea\u662f\u5c55\u793a\u3001\u6253\u5370\u5012\u65e0\u59a8\uff0c\u4f46\u5982\u679c\u9700\u8981\u540e\u7eed\u5f15\u7528\u8be5\u5b57\u7b26\u4e32\uff08\u5982\u7528VLOOKUP\u5339\u914d\uff09\uff0c\u56e0\u4e3a\u524d\u9762\u591a\u4e86\u4e00\u4e2a\u4e0d\u53ef\u89c1\u7684\u7a7a\u683c\uff0c\u957f\u5ea6\u4e5f\u591a\u4e86\u4e00\u4f4d\uff0c\u5219\u53ef\u80fd\u4f1a\u51fa\u9519\u3002<\/p>\n<p>\u540e\u6765\u60f3\u8d77excel\u8f93\u5165\u957f\u6570\u5b57\u7684\u53ef\u5728\u6570\u5b57\u524d\u8f93\u5165\u5355\u5f15\u53f7\u201d\u2018\u201d\u5f3a\u5236\u8f6c\u4e3a\u6587\u672c\uff0c\u5728 mysql\u8f93\u51fa\u65f6\u4e5f\u53ef\u4ee5\u8bd5\u8bd5\uff0c\u6d4b\u8bd5\u53ef\u7528\uff1a<\/p>\n<p>\u5373\uff1a<\/p>\n<pre class=\"prism-highlight prism-language-sql\">CONCAT(&quot;&#39;&quot;,str)<\/pre>\n<p>\u6216\u8005<\/p>\n<pre class=\"prism-highlight prism-language-sql\">CONCAT(&quot;\\&#39;&quot;,str)<\/pre>\n<p>\u53e6\u5916\u6ce8\u610f\u9700\u4fdd\u5b58\u4e3aexcel\u6587\u4ef6,\u5373xls\u6216xlsx\u6587\u4ef6\uff0c\u8be5\u6570\u5b57\u5373\u5df2\u5f3a\u8f6c\u4e3a\u6587\u672c\u683c\u5f0f\uff1b\u5982\u4fdd\u5b58\u4e3acsv\uff0c\u7528excel\u6253\u5f00\u5219\u663e\u793a\u4e3a\u53ef\u89c1\u5355\u5f15\u53f7+\u6570\u5b57\u5f62\u5f0f\uff0c\u539f\u56e0\u5c1a\u4e0d\u660e\u3002<\/p>\n<p>\u603b\u7ed3\uff1a<\/p>\n<p>1.\u5982\u679c\u53ea\u9700\u8981\u5bfc\u51fa\u5c55\u793a\u3001\u6253\u5370\uff1a\u53ef\u4f7f\u7528<\/p>\n<pre class=\"prism-highlight prism-language-sql\">CONCAT(&quot;\\t&quot;,str)<\/pre>\n<p>2.\u5982\u679c\u9700\u8981\u540e\u7eed\u5904\u7406\uff0c\u5f15\u7528\uff0c\u6700\u597d\u4f7f\u7528<\/p>\n<pre class=\"prism-highlight prism-language-sql\">CONCAT(&quot;&#39;&quot;,str)<\/pre>\n<p>\u6216\u8005<\/p>\n<pre class=\"prism-highlight prism-language-sql\">CONCAT(&quot;\\&#39;&quot;,str)<\/pre>\n<p>\u5e76\u5bfc\u51fa\u4e3aEXCEL\u6587\u4ef6\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre class=\"prism-highlight prism-language-sql\">SELECT&nbsp;card_id,CONCAT(&quot;&#39;&quot;,card_number),CONCAT(&quot;&#39;&quot;,card_number2)&nbsp;from&nbsp;cardtelecom&nbsp;WHERE&nbsp;area=1511;<\/pre>\n<p><\/p>\n<!--wp-compress-html no compression--><!--wp-compress-html-->","protected":false},"excerpt":{"rendered":"\u7ecf\u5e38\u9047\u5230MYSQL\u5bfc\u51fa\u957f\u6570\u5b57\u6216\u7eaf\u6570\u5b57\u5b57\u7b26\u4e32\uff08\u5982\u8eab\u4efd\u8bc1\u3001\u5361\u5238\u53f7\u3001\u6761\u7801\u3001\u6d41\u6c34\u53f7\u7b49\uff09\u5230csv\u6216excel\u6587\u4ef6\uff0c\u7528ex \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"views":327,"_links":{"self":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/293"}],"collection":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/comments?post=293"}],"version-history":[{"count":0,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/293\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}