SELECT *
FROM t1
JOIN t2
ON t1.id1 = t2.id2
yields a JOIN of those tables on MySQL. How can I store the result in a third table without having to define it column by column.
I tried this to create the third table but it doesn’t work.
CREATE TABLE t3 LIKE
(
SELECT *
FROM t1
JOIN t2
ON t1.id1 = t2.id2
) a
If you want the new table to contain the results of your
SELECT:Or if you just want it to be based on the schema of the join: