Answer the question
In order to leave comments, you need to log in
How to save the result of a query to a table?
How to save the result of a query to a table?
I write like this
INSERT INTO `test`(`id`, `ru`, `en`, `zh`)
VALUES (ru.id, ru.name, en.name, zh.name)
SELECT ru.id, ru.name, en.name, zh.name
FROM ru
LEFT JOIN en ON ru.id = en.id
LEFT JOIN zh ON ru.id = zh.id
Answer the question
In order to leave comments, you need to log in
INSERT INTO `test`(`id`, `ru`, `en`, `zh`)
SELECT ru.id, ru.name, en.name, zh.name
FROM ru
LEFT JOIN en ON ru.id = en.id
LEFT JOIN zh ON ru.id = zh.id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question