{"id":27137,"date":"2024-11-24T11:10:01","date_gmt":"2024-11-24T03:10:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27137\/"},"modified":"2024-11-24T11:10:01","modified_gmt":"2024-11-24T03:10:01","slug":"%e5%a6%82%e4%bd%95%e5%88%a0%e9%99%a4%e6%95%b0%e6%8d%ae%e5%ba%93%e4%b8%ad%e9%87%8d%e5%a4%8d%e5%ad%97%e6%ae%b5%e4%b8%94%e7%89%b9%e5%ae%9a%e5%88%97%e4%b8%ba%e7%a9%ba%e7%9a%84%e8%a1%8c%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27137\/","title":{"rendered":"\u5982\u4f55\u5220\u9664\u6570\u636e\u5e93\u4e2d\u91cd\u590d\u5b57\u6bb5\u4e14\u7279\u5b9a\u5217\u4e3a\u7a7a\u7684\u884c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173119810361594.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5220\u9664\u6570\u636e\u5e93\u4e2d\u91cd\u590d\u5b57\u6bb5\u4e14\u7279\u5b9a\u5217\u4e3a\u7a7a\u7684\u884c\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5220\u9664\u6570\u636e\u5e93\u4e2d\u91cd\u590d\u5b57\u6bb5\u4e14\u7279\u5b9a\u5217\u4e3a\u7a7a\u7684\u884c\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5220\u9664\u6570\u636e\u5e93\u91cd\u590d\u5b57\u6bb5\u4e14\u7279\u5b9a\u5217\u4e3a\u7a7a\u7684\u884c<\/strong><\/p>\n<p>\u5728\u5173\u7cfb\u578b\u6570\u636e\u5e93\u4e2d\uff0c\u5f53\u9700\u8981\u5220\u9664\u5177\u6709\u7279\u5b9a\u5b57\u6bb5\u91cd\u590d\u4f46\u540c\u65f6\u53e6\u4e00\u5217\u503c\u4e3a null \u7684\u884c\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528 sql \u67e5\u8be2\u3002<\/p>\n<p>\u8003\u8651\u4ee5\u4e0b\u573a\u666f\uff1a<\/p>\n<p>\u6570\u636e\u7684datas\u8868\u4e2d\u5b58\u50a8\u4e86\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>credit<\/th>\n<th>company<\/th>\n<th>name<\/th>\n<th>phone<\/th>\n<th>id<\/th>\n<th>pid<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u5f20\u4e09<\/td>\n<td>3930<\/td>\n<td>21d4f7<\/td>\n<td>null<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u5f20\u4e09<\/td>\n<td>3930<\/td>\n<td>21d4f7<\/td>\n<td>6ec897<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u738b\u4e94<\/td>\n<td>1895<\/td>\n<td>2c6dcd<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u738b\u4e94<\/td>\n<td>1895<\/td>\n<td>a8c70b<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u674e\u56db<\/td>\n<td>9894<\/td>\n<td>33db09<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u674e\u56db<\/td>\n<td>9894<\/td>\n<td>703e16<\/td>\n<td>null<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u674e\u56db<\/td>\n<td>9894<\/td>\n<td>0faa54<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u76ee\u6807\u662f\u5220\u9664credit\u3001company\u3001name\u3001phone\u548cid\u5b57\u6bb5\u76f8\u540c\u4f46pid\u4e3a\u7a7a\u7684\u884c\uff0c\u800c\u4fdd\u7559pid\u4e0d\u4e3a\u7a7a\u7684\u884c\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<pre>DELETE FROM datas \nWHERE pid IS NULL AND (credit, company, name, phone, id, rootid) IN (\n    SELECT credit, company, name, phone, id, rootid \n    FROM datas \n    WHERE pid IS NOT NULL\n);<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b64\u67e5\u8be2\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u4ecedatas\u8868\u4e2d\u9009\u62e9\u6240\u6709pid\u4e3a\u7a7a\u7684\u884c\u3002<\/li>\n<li>\u4f7f\u7528in\u5b50\u67e5\u8be2\u4ecepid\u4e0d\u4e3a\u7a7a\u7684\u884c\u4e2d\u9009\u62e9credit\u3001company\u3001name\u3001phone\u548cid\u5b57\u6bb5\u7684\u7ec4\u5408\u3002<\/li>\n<li>\u5220\u9664\u4e0e\u5b50\u67e5\u8be2\u4e2d\u9009\u62e9\u7684\u7ec4\u5408\u5339\u914d\u7684pid\u4e3a\u7a7a\u7684\u884c\u3002<\/li>\n<\/ol>\n<p>\u6267\u884c\u6b64\u67e5\u8be2\u5c06\u5220\u9664\u4ee5\u4e0b\u884c\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>credit<\/th>\n<th>company<\/th>\n<th>name<\/th>\n<th>phone<\/th>\n<th>id<\/th>\n<th>pid<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u674e\u56db<\/td>\n<td>9894<\/td>\n<td>703e16<\/td>\n<td>null<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4fdd\u7559\u4ee5\u4e0b\u884c\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>credit<\/th>\n<th>company<\/th>\n<th>name<\/th>\n<th>phone<\/th>\n<th>id<\/th>\n<th>pid<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u5f20\u4e09<\/td>\n<td>3930<\/td>\n<td>21d4f7<\/td>\n<td>6ec897<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u738b\u4e94<\/td>\n<td>1895<\/td>\n<td>2c6dcd<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u738b\u4e94<\/td>\n<td>1895<\/td>\n<td>a8c70b<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u674e\u56db<\/td>\n<td>9894<\/td>\n<td>33db09<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<tr>\n<td>99284<\/td>\n<td>\u4f20\u5a92\u6709\u9650\u516c\u53f8<\/td>\n<td>\u674e\u56db<\/td>\n<td>9894<\/td>\n<td>0faa54<\/td>\n<td>21d4f7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5220\u9664\u6570\u636e\u5e93\u4e2d\u91cd\u590d\u5b57\u6bb5\u4e14\u7279\u5b9a\u5217\u4e3a\u7a7a\u7684\u884c\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5220\u9664\u6570\u636e\u5e93\u91cd\u590d\u5b57\u6bb5\u4e14\u7279\u5b9a\u5217\u4e3a\u7a7a\u7684\u884c \u5728\u5173\u7cfb\u578b\u6570\u636e\u5e93\u4e2d\uff0c\u5f53\u9700\u8981\u5220\u9664\u5177\u6709\u7279\u5b9a\u5b57\u6bb5\u91cd\u590d\u4f46\u540c\u65f6\u53e6\u4e00\u5217\u503c\u4e3a null \u7684\u884c\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528 sql \u67e5\u8be2\u3002 \u8003\u8651\u4ee5\u4e0b\u573a\u666f\uff1a \u6570\u636e\u7684datas\u8868\u4e2d\u5b58\u50a8\u4e86\u4ee5\u4e0b\u4fe1\u606f\uff1a credit company name phone id pid 99284 \u4f20\u5a92\u6709\u9650\u516c\u53f8 \u5f20\u4e09 3930 21d4f7 null 99284 \u4f20\u5a92\u6709\u9650\u516c\u53f8 \u5f20\u4e09 3930 21d4f7 6ec897 99284 \u4f20\u5a92\u6709\u9650\u516c\u53f8 \u738b\u4e94 1895 2c6dcd 21d4f7 99284 \u4f20\u5a92\u6709\u9650\u516c\u53f8 \u738b\u4e94 1895 a8c70b 21d4f7 99284 \u4f20\u5a92\u6709\u9650\u516c\u53f8 \u674e\u56db 9894 33db09 21d4f7 99284 \u4f20\u5a92\u6709\u9650\u516c\u53f8 \u674e\u56db 9894 703e16 null 99284 \u4f20\u5a92\u6709\u9650\u516c\u53f8 \u674e\u56db 9894 0faa54 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-27137","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27137"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27137\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}