wants to know how to do an UPDATE ... SELECT FROM ...,
I did the equivalent of:
BEGIN;
ALTER TABLE b ADD Col3 ...;
CREATE TABLE CopyCol3
SELECT b.id, b.Col1, b.Col2, a.Col3
FROM b
LEFT JOIN a
ON a.id = b.id;
REPLACE INTO b (Col1, Col2, Col3)
SELECT *
FROM
I have a table a with:
ItemID int unsigned not null,
CommID int unsigned not null
I have a table b with:
ItemID int unsigned not null
I want to move CommID from table a to table b. I've updated my schema
to have CommID in b as well for now, and changed my code to insert the
value into table