1
Long 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 unite them. However, I need to do this without losing the data.
What command can I do taking into account that new codes will be generated (since the key is auto increment) and need to update the other tables with the new code generated?
Is there anything like:
insert into x select * from y and z
And still updating with the new codes?
Table
cd_quadro int
nm_medida varchar(30)
cd_progresso int
impresso bool
entregue bool
Table Panel
cd_painel int
nm_medida varchar(30)
cd_progresso int
impresso bool
entregue bool
Table Event
cd_evento int
nm_evento varchar(100)
cd_quadro int
cd_painel int
The event can have a panel and a frame or only one of the 2?
– Leonardo Patricio
You can have both, only one or none; but now that you’ve asked... you really think it’s necessary to have two equal tables with different names?
– Latrova
No, just a table with a type field, for example 1 for frame and 2 for panel.
– Leonardo Patricio
@Lizard, you’ve solved the problem?
– Caputo