これは機能するクエリです:
SELECT
CONCAT(
UPPER(SUBSTRING(Name,1,1)),
LOWER(SUBSTRING(Name,2,Locate(' ', Name)-1)),
UPPER(SUBSTRING(Name,Locate(' ', Name)+1,1)),
LOWER(SUBSTRING(Name,Locate(' ', Name)+2)))
FROM NameTable;
この結果:
Name
Firstname Lastname
Firstname Lastname
Firstname Lastname
Firstname Lastname
列の使用を更新するには、
UPDATE NameTable
SET NameTable.Name = CONCAT(
UPPER(SUBSTRING(Name,1,1)),
LOWER(SUBSTRING(Name,2,Locate(' ', Name)-1)),
UPPER(SUBSTRING(Name,Locate(' ', Name)+1,1)),
LOWER(SUBSTRING(Name,Locate(' ', Name)+2)));
よろしく