How can i insert values into two table in 1 query? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How can i insert values into two table in 1 query?

How can i insert values into two tables in 1 query? each table from different database. with example.

28th Aug 2019, 10:24 PM
Demby P
1 Answer
+ 4
Sorry to be bearer of a bad news but it's not possible in one insert. Luckily it could be done in one transaction :) But to be honest, it has no meaning at all to merge insert into one single query if separate inserts works.
29th Aug 2019, 11:01 AM
r8w9
r8w9 - avatar