Answer the question
In order to leave comments, you need to log in
How to copy data from 2 tables into one?
INSERT into archive (title_product, title_category, price_product)
SELECT title from product,
SELECT title from category,
SELECT price from product;
Answer the question
In order to leave comments, you need to log in
Correctly build a selection from the desired tables.
INSERT into archive (title_product, title_category, price_product)
SELECT p.title, c.title, p.price
from product p
join category c on p.category_id = c.id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question