{"id":1076,"date":"2023-03-12T10:58:47","date_gmt":"2023-03-12T02:58:47","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1076"},"modified":"2023-04-29T11:42:52","modified_gmt":"2023-04-29T03:42:52","slug":"mysql-skills","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/12\/mysql-skills\/","title":{"rendered":"MySQL\u6280\u5de7"},"content":{"rendered":"<h3>\u7c7b\u578b\u8f6c\u6362<\/h3>\n<pre><code class=\"language-sql\">SELECT CONVERT(`merchant_id`, CHAR) FROM `merchant_info`<\/code><\/pre>\n<p><!-- more --><\/p>\n<h3>\u5bf9\u67e5\u8be2\u4e3anull\u7684\u503c\u8d4b\u9ed8\u8ba4\u503c<\/h3>\n<pre><code class=\"language-sql\">select ifnull(\u5b57\u6bb5,0) from \u8868\u540d<\/code><\/pre>\n<pre><code class=\"language-sql\">SELECT ifnull(SUM(r.refunded_amount), 0) as refunded_amount\n    FROM refund_order r\n    WHERE r.pay_order_no = p.pay_order_no<\/code><\/pre>\n<h3>\u663e\u793abinlog\u53d8\u91cf<\/h3>\n<pre><code class=\"language-sql\">SHOW VARIABLES like &quot;%binlog%&quot;<\/code><\/pre>\n<h3>\u5b57\u6bb5\u5185\u5bb9\u66ff\u6362<\/h3>\n<pre><code class=\"language-sql\">update merchant_document d set d.doc_path = REPLACE(d.doc_path, &#039;prod\/appblog&#039;, &#039;appblog\/prod&#039;)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7c7b\u578b\u8f6c\u6362 SELECT CONVERT(`merchant_id`, CHAR) FROM `merchant [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-1076","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1076"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1076\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}