Skip to content
Advertisement

Insert 2 select in same insert SQL

i have a problem, i would like use 2 select to insert in new table but i don’t know if it’s possible…

my code :

I would like insert the second part ( select COLONNE01….) in the first part instead of “INSERT HERE”

DATA OLD TABLE : COLUMNS 1 (“PKID1″, one”,”two”,”three”) COLUMNS 2 (“PKID2″,”one”,”two”, “three”)

New TABLE :

(PKID1, one, 1) (PKID2, one, 1) (PKID1, two, 2) (PKID2, two, 2) (PKID1, three, 3) (PKID2, three, 3)

Advertisement

Answer

Isn’t that just as simple as this?

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement