copy all columns of a table in another table having different order of columns
I have two tables named
1... product (pid, pname, pdesc, code, stock)
2... product1(pid, pname, img1, img2, pdesc, code, stock)
actually there are two more (img1, img2) columns added as required, so new table created product
have tried this out
[update product1
set pdesc = (select pdesc from product )]
maybe it contains errorful code, (little lack of knowledge in sql)
so just do me a favor, and rewrite it again… please
But if
pidis an auto-increment column you have to leave that one and doAnd if
img1andimg2can’t benullyou have to give them an default value like this: