1
How do I return the last auto id 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 wanted to get the last id in the case of Insert or the updated registry id in the case of update.
Exists as?