How can I fetch the last row I inserted using DBI? September 18, 2023 by Tarik This is a property of the statement handle. You should be able to access the ID like that: $sth->{mysql_insertid}