Capitalize first letter in mysql - Mysql Views : 1112
Tagged in : Mysql
0 0
Send mail
Capitalize first letter in mysql:

To make first letter capital in mysql use the following format:

UPDATE tablename SET
FieldName = CONCAT(UPPER(LEFT(FieldName,1)),SUBSTRING(FieldName FROM 2));


For eg,

update table1 set
name1= CONCAT(UPPER(LEFT(name1, 1)), SUBSTRING(name1 FROM 2));


Now there is no need to change the field name individually to capitalize first letter in mysql.
Hence it saves time to make first letter capital in mysql using a single query.
By Ramya, On - 2009-11-04



    Login to add Comments .