{"id":4089,"date":"2020-12-22T14:59:10","date_gmt":"2020-12-22T05:59:10","guid":{"rendered":"https:\/\/okamurax.com\/?p=4089"},"modified":"2020-12-22T15:22:23","modified_gmt":"2020-12-22T06:22:23","slug":"mysql-%e3%83%80%e3%83%b3%e3%83%97%e3%83%87%e3%83%bc%e3%82%bf%e3%81%8b%e3%82%89%e8%a1%8c%e5%8d%98%e4%bd%8d%e3%81%ae%e6%8a%9c%e3%81%8d%e5%87%ba%e3%81%97","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=4089","title":{"rendered":"MySQL \u30c0\u30f3\u30d7\u30c7\u30fc\u30bf\u304b\u3089\u884c\u5358\u4f4d\u306e\u629c\u304d\u51fa\u3057"},"content":{"rendered":"<p>\u9593\u9055\u3048\u3066\u524a\u9664\u3057\u305f\u884c\u3092\u5fa9\u65e7\u3059\u308b\u305f\u3081\u3001\u30c0\u30f3\u30d7\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30c7\u30fc\u30bf\u304b\u3089\u7279\u5b9a\u306e\u884c\u3092\u629c\u304d\u51fa\u3059\u3053\u3068\u306b\u306a\u3063\u305f\u3002<\/p>\n<p>\u6761\u4ef6\u304c\u7c21\u5358\u306a\u3089\u3001mysqldump\u3060\u3051\u3067\u3082\u3067\u304d\u308b\u3002<\/p>\n<p>\u5fc5\u8981\u306a\u3089\u30c0\u30f3\u30d7\u30c7\u30fc\u30bf\u3092\u5225\u74b0\u5883\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001<br \/>\nmysqldump -t -u user &#8211;where &#8220;xxx = xxx&#8221; database_name table_name &gt; dump.sql<\/p>\n<p>\u305d\u3057\u3066\u3001\u66f8\u304d\u51fa\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3002<\/p>\n<p>\uff0a\uff0a\uff0a<\/p>\n<p>\u4eca\u56de\u306f\u5b50\u30c6\u30fc\u30d6\u30eb\u3082\u524a\u9664\u3055\u308c\u3066\u3044\u3066SQL\u3092\u4f7f\u3044\u305f\u3044\u306e\u3067\u3001\u65b0\u3057\u3044\u30c6\u30fc\u30d6\u30eb\u306b\u30c7\u30fc\u30bf\u3092\u30b3\u30d4\u30fc\u3057\u305d\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u66f8\u304d\u51fa\u3059\u3053\u3068\u306b\u3002<\/p>\n<p>\u30fb(\u5fc5\u8981\u306a\u3089)\u30c0\u30f3\u30d7\u30c7\u30fc\u30bf\u3092\u5225\u74b0\u5883\u306b\u30a4\u30f3\u30dd\u30fc\u30c8<\/p>\n<p>\u30fb\u30b9\u30ad\u30fc\u30de\u30b3\u30d4\u30fc<br \/>\ncreate table AA like A<\/p>\n<p>\u30fb\u30c7\u30fc\u30bf\u30b3\u30d4\u30fc<br \/>\ninsert into AA select * from A where exists (<br \/>\nselect * from B where A.ID = B.ID);<br \/>\n\u3053\u306e\u3088\u3046\u306a\u611f\u3058(A\u30c6\u30fc\u30d6\u30eb\u3092AA\u30c6\u30fc\u30d6\u30eb\u306b\u66f8\u304d\u51fa\u3059\u6642\u3001B\u30c6\u30fc\u30d6\u30eb\u306b\u7279\u5b9a\u306e\u5024\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b)<\/p>\n<p>\u30fb\u30c7\u30fc\u30bf\u66f8\u304d\u51fa\u3057<br \/>\nmysqldump -t -u user database_name tmp_tbl &gt; dump.sql<br \/>\n(Workbench\u306a\u3089\u3001Server\uff1eDataExport\u304b\u3089)<\/p>\n<p>\u30fb\u66f8\u304d\u51fa\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3067\u30c6\u30fc\u30d6\u30eb\u540d\u306a\u3069\u3092\u4fee\u6b63\u3057\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9593\u9055\u3048\u3066\u524a\u9664\u3057\u305f\u884c\u3092\u5fa9\u65e7\u3059\u308b\u305f\u3081\u3001\u30c0\u30f3\u30d7\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30c7\u30fc\u30bf\u304b\u3089\u7279\u5b9a\u306e\u884c\u3092\u629c\u304d\u51fa\u3059\u3053\u3068\u306b\u306a\u3063\u305f\u3002 \u6761\u4ef6\u304c\u7c21\u5358\u306a\u3089\u3001mysqldump\u3060\u3051\u3067\u3082\u3067\u304d\u308b\u3002 \u5fc5\u8981\u306a\u3089\u30c0\u30f3\u30d7\u30c7\u30fc\u30bf\u3092\u5225\u74b0\u5883\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001 mysqldump -t &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=4089\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;MySQL \u30c0\u30f3\u30d7\u30c7\u30fc\u30bf\u304b\u3089\u884c\u5358\u4f4d\u306e\u629c\u304d\u51fa\u3057&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13],"class_list":["post-4089","post","type-post","status-publish","format-standard","hentry","category-1","tag-mysql-mariadb"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/4089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4089"}],"version-history":[{"count":7,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/4089\/revisions"}],"predecessor-version":[{"id":4096,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/4089\/revisions\/4096"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}