Zils
Zils

Reputation: 405

phpmyadmin add Zero before all value for mobile no

I'm trying to fix some mobile no entry using phpmyadmin's SQL box.

Current mobile no format: 174254875444 (zero missing)

expected mobile no: 0174254875444

What I've tried

UPDATE `client_entry`
SET `contact_no` = "0" + `contact_no`;

But its not working. What would be the way to add 0 before all values on contact_no column?

Upvotes: 1

Views: 349

Answers (1)

M Khalid Junaid
M Khalid Junaid

Reputation: 64486

For mysql use concat

UPDATE `client_entry` SET `contact_no` = concat('0' , contact_no);

Upvotes: 1

Related Questions