Mysql INSERT in multiple tables with one expression

Is it possible to insert data into several tables in one statement?

For example, I have two tables (live_products and products), they are the same, except that live_products is very transactional, and I keep the number of records low (delete once), when all historical data used for reports is stored as products , and etc.

I am currently making two requests, but it would be nice to do something like

INSERT INTO live_products,products (id, name) values ('','')

This does not work ... but is there anything else?

Thank!

+3
source share
1 answer

SQL. ? , ( , ).

+1

Source: https://habr.com/ru/post/1763882/


All Articles