Remove everything but the first character of a string in a MySQL query
I am trying to run a query directly in MySQL to execute a series of records and replace the field value with only the string field character.
for example based on a column named formname
row 1 - Renault row 2 - Citreon row 3 - Jaguar
It will come back ..
row 1 - R row 2 - C row 3 - J
I can do this easily using native PHP functions, but not sure how to do it using SUBSTR function of MYSQL function?
source to share