I see. I just assumed if SQL is already looking for a duplicate then maybe it can also just give me the id/key of the row. Seems inefficient to have that as separate steps. Since they have last_insert_id, I assumed they would have a function similar.