{"id":3767,"date":"2023-10-30T14:54:32","date_gmt":"2023-10-30T06:54:32","guid":{"rendered":"https:\/\/white-night.club\/?p=3767"},"modified":"2023-11-09T11:07:45","modified_gmt":"2023-11-09T03:07:45","slug":"ad112","status":"publish","type":"post","link":"https:\/\/white-night.club\/index.php\/2023\/10\/30\/ad112\/","title":{"rendered":"1667.\u00a0\u4fee\u590d\u8868\u4e2d\u7684\u540d\u5b57"},"content":{"rendered":"\n<p>\u8868\uff1a&nbsp;<code>Users<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+----------------+---------+\n| Column Name    | Type    |\n+----------------+---------+\n| user_id        | int     |\n| name           | varchar |\n+----------------+---------+\nuser_id \u662f\u8be5\u8868\u7684\u4e3b\u952e(\u5177\u6709\u552f\u4e00\u503c\u7684\u5217)\u3002\n\u8be5\u8868\u5305\u542b\u7528\u6237\u7684 ID \u548c\u540d\u5b57\u3002\u540d\u5b57\u4ec5\u7531\u5c0f\u5199\u548c\u5927\u5199\u5b57\u7b26\u7ec4\u6210\u3002\n<\/pre>\n\n\n\n<p>\u7f16\u5199\u89e3\u51b3\u65b9\u6848\uff0c\u4fee\u590d\u540d\u5b57\uff0c\u4f7f\u5f97\u53ea\u6709\u7b2c\u4e00\u4e2a\u5b57\u7b26\u662f\u5927\u5199\u7684\uff0c\u5176\u4f59\u90fd\u662f\u5c0f\u5199\u7684\u3002<\/p>\n\n\n\n<p>\u8fd4\u56de\u6309&nbsp;<code>user_id<\/code>&nbsp;\u6392\u5e8f\u7684\u7ed3\u679c\u8868\u3002<\/p>\n\n\n\n<p>\u8fd4\u56de\u7ed3\u679c\u683c\u5f0f\u793a\u4f8b\u5982\u4e0b\u3002<\/p>\n\n\n\n<p><strong>\u793a\u4f8b 1\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\u8f93\u5165\uff1a<\/strong>\nUsers table:\n+---------+-------+\n| user_id | name  |\n+---------+-------+\n| 1       | aLice |\n| 2       | bOB   |\n+---------+-------+\n<strong>\u8f93\u51fa\uff1a<\/strong>\n+---------+-------+\n| user_id | name  |\n+---------+-------+\n| 1       | Alice |\n| 2       | Bob   |\n+---------+-------+<\/pre>\n\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<blockquote class=\"wp-block-quote has-luminous-vivid-amber-color has-text-color\">\n<p>\u89e3\u9898\u601d\u8def<\/p>\n<cite><em>\u5b57\u7b26\u4e32\u51fd\u6570<\/em><\/cite><\/blockquote>\n\n\n\n<p>\u4e3b\u8981\u5c31\u662f\u5b66\u4e60\u4e0bSQL\u4e2d\u5904\u7406\u5b57\u7b26\u4e32\u7684\u51e0\u4e2a\u51fd\u6570\uff0c\u6bd4\u5982LEFT\uff0cSubString\u8fd9\u4e9b\u4e0d\u600e\u4e48\u5e38\u7528\u7684\u3002CONCAT\u6700\u5e38\u7528\u6240\u4ee5\u8fd8\u597d\u5427\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Write your MySQL query statement below\r\nSELECT user_id,\r\nCONCAT(UPPER(LEFT(name,1)),LOWER(SUBSTRING(name,2))) AS name\r\nFROM Users\r\nORDER BY user_id ASC<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Leetcode\u9898\u76ee\uff1aSQL\u5b57\u7b26\u4e32\u51fd\u6570<\/p>\n","protected":false},"author":1,"featured_media":2827,"comment_status":"open","ping_status":"","sticky":false,"template":"base","format":"standard","meta":{"footnotes":""},"categories":[42,25],"tags":[38],"_links":{"self":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/3767"}],"collection":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/comments?post=3767"}],"version-history":[{"count":0,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/3767\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media\/2827"}],"wp:attachment":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media?parent=3767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/categories?post=3767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/tags?post=3767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}