update two table when a update table have one more field then first
i have a two table called A and B
both have same structure but B table have a one more field who may be filled or not.
i wanna a thing that when i move row from A to B then the extra field need to filled by value i have
INSERT INTO B SELECT * FROM a WHERE a.ID =?id
开发者_StackOverflow社区
by this extra column can not be filled.
are anyone know that how i can filled extra column with a row of A and value for column Extra that i have.
insert into B select col1,col2,col3,null from A
i assume A has col1,2,3 put null at end to fill empty extra field. you can put null based on your table structure
for ex col1,null,col2 if extra field in 2nd column
精彩评论