INSERT INTO newTable
SELECT n.r, o.zip, p.title, a.description
from num1000 n, orders o, products p, accessory a
where o.orderid=n.r and p.productid=n.r and a.accessoryid=n.r
if you dont have id column in newtable, just drop "n.r," from above query as:
INSERT INTO newTable
SELECT o.zip, p.title, a.description
from num1000 n, orders o, products p, accessory a
where o.orderid=n.r and p.productid=n.r and a.accessoryid=n.r
|