sql - Insert into with multiple subqueries as values -
lets suppose i've insert table many fk, explain here below wrong statement:
insert mytable values ( somevalue ,somevalue ,select id othertable1 ...condition ,select id othertable2 ...condition ,select id othertable3 ...condition ) so values insert comes different subqueries, possible achieve such behavior ?
insert mytable (columns) select somevalue, somevalue, a.id, b.id, c.id othertable1 cross join othertable2 b cross join othertable3 c ... condition b ... condition c ... condition
Comments
Post a Comment