Reputation: 251
I have a MySQL table with columns Forename, Surname
.
These are all in uppercase but I want to re-format them for example:
Forename | Surname
--------------------------
John | Doe
rather than:
Forename | Surname
--------------------------
JOHN | DOE
Is it possible to do this on all rows via MySQL directly?
Upvotes: 0
Views: 45
Reputation: 26784
UPDATE t
SET Forename=
CONCAT((substr(Forename,1,1)), LOWER(substr(Forename,2)));
Same for the other
Upvotes: 1