mysql - sql - take values from one column to another (seperate databases) -
i have 2 databases: database1
, database2
. both databases have table called users
, both users tables have column called username
, avatar
so, break down:
database1:
users
username
avatar
database2:
users
username
avatar
my question is: how can select values database1.users.avatar
, add together values column database2.users.avatar
, usernames match?
you can seek this,
update database2.users, database1.users set database2.users.avatar = database1.users.avatar database2.users.username = database1.users.username;
mysql sql
No comments:
Post a Comment