sanket parab
sanket parab

Reputation: 13

how to copy one column to another with data in mysql on same table?

I have a user_master table. And i have need to copy user's first address to alternate address column for all users those alternate address is not available.

Upvotes: 1

Views: 53

Answers (1)

Devraj  verma
Devraj verma

Reputation: 406

Just use update table query. Kindly check below.

UPDATE users_master SET alt_address = first_address WHERE alt_address = '';

Upvotes: 2

Related Questions