{"id":4406,"date":"2024-10-17T11:57:08","date_gmt":"2024-10-17T03:57:08","guid":{"rendered":"https:\/\/www.talktop.cn\/?p=4406"},"modified":"2024-11-11T15:22:42","modified_gmt":"2024-11-11T07:22:42","slug":"%e6%8e%8c%e6%8f%a1mysql%e6%95%b0%e6%8d%ae%e5%ba%93%e5%9f%ba%e7%a1%80%ef%bc%9a%e6%8f%90%e5%8d%87%e6%80%a7%e8%83%bd%e7%9a%84%e5%ae%9e%e6%88%98%e6%8a%80%e5%b7%a7%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.talktop.cn\/?p=4406","title":{"rendered":"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">\u4e00\u3001<strong>DDL\u8bed\u53e5<\/strong><\/h5>\n\n\n\n<p>DDL\u8868\u64cd\u4f5c\u8bed\u53e5<\/p>\n\n\n\n<p>\u67e5\u770b\u6307\u5b9a\u8868\u7684\u5efa\u8868\u8bed\u53e5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-8870d9c75e73a6ee272371eead9eb0e4\"><code>show create table \u8868\u540d<\/code><\/pre>\n\n\n\n<p>\u91cd\u547d\u540d\u8868\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-0aa0379d3d5efbe4e4fd864f0c4d7969\"><code>rename table old_table_name to new_table_name;<\/code><\/pre>\n\n\n\n<p>\u6dfb\u52a0\u8868\u5b57\u6bb5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-745811aa7bf6f4645af6510b7a3f1259\"><code>alter table \u8868\u540d add \u5b57\u6bb5\u540d \u7c7b\u578b\uff08\u957f\u5ea6\uff09 comment \u6ce8\u91ca<\/code><\/pre>\n\n\n\n<p>\u4fee\u6539\u8868\u5b57\u6bb5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4d2ef1627199776146dd5d7bf3c9e186\"><code>alter table \u8868\u540d modify \u65e7\u5b57\u6bb5\u540d \u65b0\u5b57\u6bb5\u540d <\/code><\/pre>\n\n\n\n<p>\u5220\u9664\u8868\u5b57\u6bb5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-e7ca254c09e135b64450ba505aeeac17\"><code>alter table \u8868\u540d drop \u5b57\u6bb5\u540d<\/code><\/pre>\n\n\n\n<p>\u521b\u5efa\u7d22\u5f15\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-1eb6bd168b6413da86ab542b19e7be0a\"><code>create index index_name on table_name(column_name)<\/code><\/pre>\n\n\n\n<p>\u5220\u9664\u7d22\u5f15\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2dc17fdcc62b76707027c328e78fc8a1\"><code>drop index index_name on table_name;<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u4e8c\u3001\u5e38\u7528SQL\u8bed\u6cd5<\/h5>\n\n\n\n<p>order by \u8bed\u53e5<\/p>\n\n\n\n<p>\u5728 ORDER BY \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u805a\u5408\u51fd\u6570\uff08\u5982 COUNT, SUM\uff09\u6216\u5728 SELECT \u4e2d\u5b9a\u4e49\u7684\u5217\u3002\u5982\u679c\u4f7f\u7528\u975e\u805a\u5408\u5217\uff0c\u786e\u4fdd\u5b83\u4eec\u5728 GROUP BY \u4e2d\u5217\u51fa\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-3a23fcb16f797182eda060bf8d022b70\"><code>SELECT product_name, SUM(quantity) AS total_quantity\nFROM sales\nGROUP BY product_name\nORDER BY total_quantity DESC;<\/code><\/pre>\n\n\n\n<p>group by having\u8bed\u53e5\uff08\u5206\u7ec4\u6761\u4ef6\u67e5\u8be2\uff09<\/p>\n\n\n\n<p>HAVING \u5b50\u53e5\u4e2d\u7684\u67e5\u8be2\u6761\u4ef6\u5fc5\u987b\u4f7f\u7528\u5728 SELECT \u67e5\u8be2\u8303\u56f4<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-f3b4e997517b783246e4baf0dc7db7c4\"><code>SELECT product_name, COUNT(*) AS sales_count\nFROM sales\nGROUP BY product_name\nHAVING COUNT(*) &gt; 2;  -- \u805a\u5408\u6761\u4ef6<\/code><\/pre>\n\n\n\n<p>case\u8bed\u53e5<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-df2f76c0a948867983448e4d91aba380\"><code>SELECT name, score,\n       CASE \n           WHEN score &gt;= 90 THEN '\u4f18\u79c0' \n           WHEN score &gt;= 75 THEN '\u826f\u597d' \n           ELSE '\u53ca\u683c' \n       END AS grade \nFROM students;<\/code><\/pre>\n\n\n\n<p>\u5173\u8054\u8868\u67e5\u8be2<\/p>\n\n\n\n<p>left join\u3001right join\u3001inner join<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\u7279\u6027<\/td><td>LEFT JOIN<\/td><td>RIGHT JOIN<\/td><td>INNER JOIN<\/td><\/tr><tr><td>\u7ed3\u679c\u96c6\u5305\u542b<\/td><td>\u5de6\u8868\uff08\u5de6\u4fa7\uff09\u6240\u6709\u8bb0\u5f55 + \u53f3\u8868\uff08\u53f3\u4fa7\uff09\u5339\u914d\u8bb0\u5f55<\/td><td>\u53f3\u8868\uff08\u53f3\u4fa7\uff09\u6240\u6709\u8bb0\u5f55 + \u5de6\u8868\uff08\u5de6\u4fa7\uff09\u5339\u914d\u8bb0\u5f55<\/td><td>\u53ea\u6709\u4e24\u4e2a\u8868\u4e2d\u5339\u914d\u7684\u8bb0\u5f55<\/td><\/tr><tr><td>\u4e0d\u5339\u914d\u8bb0\u5f55\u5904\u7406<\/td><td>\u53f3\u8868\u4e0d\u5339\u914d\u7684\u8bb0\u5f55\u663e\u793a\u4e3a NULL<\/td><td>\u5de6\u8868\u4e0d\u5339\u914d\u7684\u8bb0\u5f55\u663e\u793a\u4e3a NULL<\/td><td>\u4e0d\u5305\u62ec\u4efb\u4f55\u4e0d\u5339\u914d\u7684\u8bb0\u5f55<\/td><\/tr><tr><td>\u4f7f\u7528\u573a\u666f<\/td><td>\u9700\u8981\u4fdd\u7559\u5de6\u8868\u6240\u6709\u6570\u636e\uff0c\u67e5\u770b\u53f3\u8868\u76f8\u5173\u4fe1\u606f<\/td><td>\u9700\u8981\u4fdd\u7559\u53f3\u8868\u6240\u6709\u6570\u636e\uff0c\u67e5\u770b\u5de6\u8868\u76f8\u5173\u4fe1\u606f<\/td><td>\u53ea\u5173\u5fc3\u4e24\u4e2a\u8868\u4e2d\u5339\u914d\u7684\u8bb0\u5f55<\/td><\/tr><tr><td>\u8bed\u6cd5\u793a\u4f8b<\/td><td>sql SELECT * FROM table1 LEFT JOIN table2 ON table1.id = table2.id;<\/td><td>sql SELECT * FROM table1 RIGHT JOIN table2 ON table1.id = table2.id;<\/td><td>sql SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-77a25a0073d6846a704187d7139d0513\"><code>SELECT employees.name, departments.department_name\nFROM employees\nINNER JOIN departments ON employees.id = departments.id;<\/code><\/pre>\n\n\n\n<p>\u5b50\u67e5\u8be2<\/p>\n\n\n\n<p>\u5f53\u5916\u90e8\u67e5\u8be2\u9700\u8981\u4f9d\u8d56\u4e8e\u67d0\u4e2a\u7279\u5b9a\u503c\u7684\u7ed3\u679c\u65f6\uff08\u9700\u8981\u901a\u8fc7\u5904\u7406\u7684\u7279\u5b9a\u503c\uff09\u53ef\u4ee5\u4f7f\u7528\u5b50\u67e5\u8be2<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-bdba3a7efc5c13ed9e2ccb943b40ea2b\"><code>SELECT * \nFROM employees \nWHERE department_id IN (SELECT id FROM departments WHERE department_name = 'HR');<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u4e09\u3001<strong>SQL\u6267\u884c\u987a\u5e8f<\/strong><\/h5>\n\n\n\n<p>\u5728MySQL\u4e2d\uff0cSQL\u8bed\u53e5\u7684\u6267\u884c\u987a\u5e8f\u901a\u5e38\u4e3a\uff1a<\/p>\n\n\n\n<p>\uff081\uff09FROM\uff1a\u786e\u5b9a\u6570\u636e\u6e90\u548c\u8868\u3002<\/p>\n\n\n\n<p>\uff082\uff09JOIN\uff1a\u6267\u884c\u8fde\u63a5\u64cd\u4f5c\uff08\u5982INNER JOIN\u3001LEFT JOIN\u7b49\uff09\u3002<\/p>\n\n\n\n<p>\uff083\uff09WHERE\uff1a\u8fc7\u6ee4\u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u3002<\/p>\n\n\n\n<p>\uff084\uff09GROUP BY\uff1a\u5bf9\u7ed3\u679c\u8fdb\u884c\u5206\u7ec4\u3002<\/p>\n\n\n\n<p>\uff085\uff09HAVING\uff1a\u8fc7\u6ee4\u5206\u7ec4\u540e\u7684\u7ed3\u679c\u3002<\/p>\n\n\n\n<p>\uff086\uff09SELECT\uff1a\u9009\u62e9\u8981\u8fd4\u56de\u7684\u5217\u3002<\/p>\n\n\n\n<p>\uff087\uff09DISTINCT\uff1a\u53bb\u91cd\u7ed3\u679c\u3002<\/p>\n\n\n\n<p>\uff088\uff09ORDER BY\uff1a\u5bf9\u7ed3\u679c\u6392\u5e8f\u3002<\/p>\n\n\n\n<p>\uff089\uff09LIMIT\uff1a\u9650\u5236\u8fd4\u56de\u7684\u8bb0\u5f55\u6570\u91cf\u3002<\/p>\n\n\n\n<p>sql\u793a\u4f8b<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-a9a81c9df28c79705fe2aa70c2bf2b86\"><code>SELECT \n    department_id, \n    AVG(salary) AS average_salary \nFROM \n    employees \nJOIN \n    departments ON employees.department_id = departments.id \nWHERE \n    employees.status = 'active' \nGROUP BY \n    department_id \nHAVING \n    AVG(salary) &gt; 50000 \nORDER BY \n    average_salary DESC \nLIMIT 10;<\/code><\/pre>\n\n\n\n<p>\u611f\u5174\u8da3\u7684\u53ef\u4ee5\u7559\u8a00\uff0c\u4e0a\u8ff0sql\u7684\u6267\u884c\u987a\u5e8f\u662f\u4ec0\u4e48\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001DDL\u8bed\u53e5 DDL\u8868\u64cd\u4f5c\u8bed\u53e5 \u67e5\u770b\u6307\u5b9a\u8868\u7684\u5efa\u8868\u8bed\u53e5\uff1a \u91cd\u547d\u540d\u8868\uff1a \u6dfb\u52a0\u8868\u5b57\u6bb5\uff1a \u4fee\u6539\u8868\u5b57\u6bb5\uff1a \u5220\u9664\u8868\u5b57\u6bb5\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[],"class_list":["post-4406","post","type-post","status-publish","format-standard","hentry","category-118"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01<\/title>\n<meta name=\"description\" content=\"\u5728MySQL\u4e2d\uff0cSQL\u8bed\u53e5\u7684\u6267\u884c\u987a\u5e8f\u901a\u5e38\u662f\u5982\u4e0b\uff0cFROM\uff1a\u786e\u5b9a\u6570\u636e\u6e90\u548c\u8868\u3002JOIN\uff1a\u6267\u884c\u8fde\u63a5\u64cd\u4f5c\uff08\u5982INNER JOIN\u3001LEFT JOIN\u7b49\uff09\u3002WHERE\uff1a\u8fc7\u6ee4\u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u3002GROUP BY\uff1a\u5bf9\u7ed3\u679c\u8fdb\u884c\u5206\u7ec4\u3002HAVING\uff1a\u8fc7\u6ee4\u5206\u7ec4\u540e\u7684\u7ed3\u679c\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.talktop.cn\/?p=4406\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.talktop.cn\/?p=4406#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.talktop.cn\/?p=4406\"},\"author\":{\"name\":\"AI\u98ce\u5411\u6807\",\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\"},\"headline\":\"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01\",\"datePublished\":\"2024-10-17T03:57:08+00:00\",\"dateModified\":\"2024-11-11T07:22:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.talktop.cn\/?p=4406\"},\"wordCount\":89,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\"},\"articleSection\":[\"\u540e\u7aef\u5f00\u53d1\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.talktop.cn\/?p=4406#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.talktop.cn\/?p=4406\",\"url\":\"https:\/\/www.talktop.cn\/?p=4406\",\"name\":\"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01\",\"isPartOf\":{\"@id\":\"https:\/\/www.talktop.cn\/#website\"},\"datePublished\":\"2024-10-17T03:57:08+00:00\",\"dateModified\":\"2024-11-11T07:22:42+00:00\",\"description\":\"\u5728MySQL\u4e2d\uff0cSQL\u8bed\u53e5\u7684\u6267\u884c\u987a\u5e8f\u901a\u5e38\u662f\u5982\u4e0b\uff0cFROM\uff1a\u786e\u5b9a\u6570\u636e\u6e90\u548c\u8868\u3002JOIN\uff1a\u6267\u884c\u8fde\u63a5\u64cd\u4f5c\uff08\u5982INNER JOIN\u3001LEFT JOIN\u7b49\uff09\u3002WHERE\uff1a\u8fc7\u6ee4\u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u3002GROUP BY\uff1a\u5bf9\u7ed3\u679c\u8fdb\u884c\u5206\u7ec4\u3002HAVING\uff1a\u8fc7\u6ee4\u5206\u7ec4\u540e\u7684\u7ed3\u679c\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.talktop.cn\/?p=4406#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.talktop.cn\/?p=4406\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.talktop.cn\/?p=4406#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.talktop.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.talktop.cn\/#website\",\"url\":\"https:\/\/www.talktop.cn\/\",\"name\":\"AI\u98ce\u5411\u6807\",\"description\":\"ChatGPT \u4eba\u5de5\u667a\u80fd \u7f16\u7a0b\u6280\u672f AIGC \u540e\u7aef\u6280\u672f \u524d\u7aef\u6280\u672f \u70ed\u95e8\u63d2\u4ef6 \u8fd0\u8425\u76f8\u5173 ChatGPT\u8ba2\u9605 Claude\u5145\u503c \u6d77\u5916\u5145\u503c \u8c37\u6b4c\u90ae\u7bb1\",\"publisher\":{\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\"},\"alternateName\":\"AI\u98ce\u5411\u6807\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.talktop.cn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\",\"name\":\"AI\u98ce\u5411\u6807\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg\",\"contentUrl\":\"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg\",\"width\":512,\"height\":512,\"caption\":\"AI\u98ce\u5411\u6807\"},\"logo\":{\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01","description":"\u5728MySQL\u4e2d\uff0cSQL\u8bed\u53e5\u7684\u6267\u884c\u987a\u5e8f\u901a\u5e38\u662f\u5982\u4e0b\uff0cFROM\uff1a\u786e\u5b9a\u6570\u636e\u6e90\u548c\u8868\u3002JOIN\uff1a\u6267\u884c\u8fde\u63a5\u64cd\u4f5c\uff08\u5982INNER JOIN\u3001LEFT JOIN\u7b49\uff09\u3002WHERE\uff1a\u8fc7\u6ee4\u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u3002GROUP BY\uff1a\u5bf9\u7ed3\u679c\u8fdb\u884c\u5206\u7ec4\u3002HAVING\uff1a\u8fc7\u6ee4\u5206\u7ec4\u540e\u7684\u7ed3\u679c\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.talktop.cn\/?p=4406","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.talktop.cn\/?p=4406#article","isPartOf":{"@id":"https:\/\/www.talktop.cn\/?p=4406"},"author":{"name":"AI\u98ce\u5411\u6807","@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab"},"headline":"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01","datePublished":"2024-10-17T03:57:08+00:00","dateModified":"2024-11-11T07:22:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.talktop.cn\/?p=4406"},"wordCount":89,"commentCount":0,"publisher":{"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab"},"articleSection":["\u540e\u7aef\u5f00\u53d1"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.talktop.cn\/?p=4406#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.talktop.cn\/?p=4406","url":"https:\/\/www.talktop.cn\/?p=4406","name":"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01","isPartOf":{"@id":"https:\/\/www.talktop.cn\/#website"},"datePublished":"2024-10-17T03:57:08+00:00","dateModified":"2024-11-11T07:22:42+00:00","description":"\u5728MySQL\u4e2d\uff0cSQL\u8bed\u53e5\u7684\u6267\u884c\u987a\u5e8f\u901a\u5e38\u662f\u5982\u4e0b\uff0cFROM\uff1a\u786e\u5b9a\u6570\u636e\u6e90\u548c\u8868\u3002JOIN\uff1a\u6267\u884c\u8fde\u63a5\u64cd\u4f5c\uff08\u5982INNER JOIN\u3001LEFT JOIN\u7b49\uff09\u3002WHERE\uff1a\u8fc7\u6ee4\u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u3002GROUP BY\uff1a\u5bf9\u7ed3\u679c\u8fdb\u884c\u5206\u7ec4\u3002HAVING\uff1a\u8fc7\u6ee4\u5206\u7ec4\u540e\u7684\u7ed3\u679c\u3002","breadcrumb":{"@id":"https:\/\/www.talktop.cn\/?p=4406#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.talktop.cn\/?p=4406"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.talktop.cn\/?p=4406#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.talktop.cn\/"},{"@type":"ListItem","position":2,"name":"\u638c\u63e1MySQL\u6570\u636e\u5e93\u57fa\u7840\uff1a\u63d0\u5347\u6027\u80fd\u7684\u5b9e\u6218\u6280\u5de7\uff01"}]},{"@type":"WebSite","@id":"https:\/\/www.talktop.cn\/#website","url":"https:\/\/www.talktop.cn\/","name":"AI\u98ce\u5411\u6807","description":"ChatGPT \u4eba\u5de5\u667a\u80fd \u7f16\u7a0b\u6280\u672f AIGC \u540e\u7aef\u6280\u672f \u524d\u7aef\u6280\u672f \u70ed\u95e8\u63d2\u4ef6 \u8fd0\u8425\u76f8\u5173 ChatGPT\u8ba2\u9605 Claude\u5145\u503c \u6d77\u5916\u5145\u503c \u8c37\u6b4c\u90ae\u7bb1","publisher":{"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab"},"alternateName":"AI\u98ce\u5411\u6807","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.talktop.cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab","name":"AI\u98ce\u5411\u6807","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/","url":"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg","contentUrl":"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg","width":512,"height":512,"caption":"AI\u98ce\u5411\u6807"},"logo":{"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/posts\/4406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4406"}],"version-history":[{"count":0,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/posts\/4406\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}