我应该使用哪个 SQL 命令来组织大写和小写?

Which SQL command should I use to organise upper case and lower case?

例如,

标题 文章 table 下的当前值是:

我必须把第一个字符改成大写,后面的字符改成小写。

交易后应该是这样的:

我应该使用哪个 SQL 命令来使用 MySQL 查询更改 title 的所有数据并永久更改它们?

显然,这有效:

CONCAT(UPPER(SUBSTRING(title, 1, 1)),LOWER(SUBSTRING(title, 2)))

使用 PHP 中的 ucfirst(); 功能。 首先在变量中检索它,然后将其传递给 ucfirst(); 函数并回显答案。

<?php
  $foo = 'hello world!';
  $foo = ucfirst($foo);             // Hello world!

  $bar = 'HELLO WORLD!';
  $bar = ucfirst($bar);             // HELLO WORLD!
  $bar = ucfirst(strtolower($bar)); // Hello world!
?>