Some time ago I created two tables, under different names, (for lack of experience), today I noticed that they had exactly the same fields. So I decided to put them together. But I need to do this without losing data.
What command can I make taking into account that new codes will be generated (since the key is auto increment
) and do I need to update the other tables with the new generated code?
There is something like this:
insert into x select * from y and z
And still updating with new codes?
Table Table
cd_quadro int
nm_medida varchar(30)
cd_progresso int
impresso bool
entregue bool
Panel Table
cd_painel int
nm_medida varchar(30)
cd_progresso int
impresso bool
entregue bool
Event Table
cd_evento int
nm_evento varchar(100)
cd_quadro int
cd_painel int