I have a MySQL database table C with a field called Phone. I’ve already created a new field in the C table called PhoneFixed and I want to update that field with a modified version of the Phone field.
The PhoneFixed field will use the following statement to get its value:
Concat('(',Left(C.Phone,3),') ',Right(C.Phone,8)) As `PhoneFixed`
What statement do I need to automatically update the value of PhoneFixed to be equal to the result of the statement above for all rows in my table?
If you just want to update a pre-existing
PhoneFixedcolumn for all rows, you’d run a query like this: