How do I return the last id auto increment in this case?
insert into t1(a, b, c)
select d, e, f from t2
on duplicate key update b = e, c = f;
I've tried last_insert_id (), but it returns the last id of the table and not the transaction.
I would like to get the last id in the case of the insert or the updated registry id in case of update.
Is there a way?