1
After entering a record, I use the select max(IDControle)
to recover table id to record items.
When the time is only 1 second, I noticed that the items were all recorded in the first record. Does anyone have any idea how this could be avoided?
insert into TB_C_ORCAMENTO (descricaosituacao) values ('exemplo');
select max(controle) from TB_C_ORCAMENTO;
insert into TB_D_ORCAMENTO (controle, descricaoproduto) values (10, 'teste');
I didn’t quite understand your question, could you please explain a little better?
– PauloHDSousa
Put what you did, give example of what happens.
– Maniero
When you have 2 tables is the recording is made with a difference of 1 second I noticed that the items are recorded with the ID of the first query. Tell me what you don’t understand?
– Harry