I had been wondering this for few days. I wanted a solution which could comvert first letter of text in some fields to uppercase and the rest to lower. I got time today and experimented a bit and found a very simple solution.
fnameVARCHAR( 50 ) NOT NULL
Query above makes a temporary table ‘temp_users’ to store the updated data.
temp_usersSELECT CONCAT( UPPER( SUBSTRING( fname, 1, 1 ) ) , LOWER( SUBSTRING( fname, 2 ) ) ) , email FROM
This query selects the data from the current table, converts the case and inserts into our temporary table ‘temp_users’.
The converted data has now been been stored into a temporary table. Now you can drop the table ‘users’ and rename ‘temp_users’ to ‘users’.
users; RENAME TABLE
And that is all.