So you have all types of string in a mysql database.
Eg:
MySQL
MYSQL
mysql
MySqL
And you want to make the first letter of each record uppercase and the rest lowercase.
Here is the update syntax for this job:
UPDATE mytable SET myfield=CONCAT(UPPER(SUBSTRING(myfield, 1, 1)), LOWER(SUBSTRING(myfield FROM 2)))
Subscribe to:
Post Comments (Atom)
1 comment:
nice code dude...
Post a Comment