Update querie
I have two tables with identical structure such as
ID, product1, product2, product3, product4, product5
Table 1 is filled with 5 ID numbers, say 1,2,3,4,5 and NULL (ie nothing) for the products.
Table 2 is filled with 10 ID numbers, 1,2,3,4,5,6,7,8,9,10 and all product details filled in (doesnt matter what with).
I have to update Table 1 such that it basically becomes a copy of table 2 with all the details.
The question basically here is can this be done with a single query or must you use an UPDATE query to first update the details of the ID numbers 1-5, and then an INSERT query to get the details of ID's 6-10 into table one?
I have tried the UPDATE query, and managed to get it to update with ID's 1-5 with the product details, but did not manage to get it to insert ID's 6-10 into table 1.
"It doesn't matter what you think!"
|