The original select:
select username,uid from db1.user LEFT JOIN db2.user on
db1.user.userid=db2.user.userid where db1.user.username is NULL;
This gives me the 65 missing usernames from db1.user that need to be inserted into
db2.user.
I use this insert statement:
Insert into db2.user select * from db1.user LEFT JOIN db2.user on
db1.user.userid=db2.user.userid where db1.user.username is NULL;
because db1.user and db2.user are identical in structure, this should work but the
error I get is
ERROR 1066: Not unique table/alias: 'user'
There are 35 columns in these tables and I've tried listing the columns in the
insert and select statement but I get the same error. Any clue?
Thanks