The MySQL database server software, which powers many websites and business applications, uses a dialect of the industry-standard Structured Query Language for database maintenance and transaction ...
There isn't anything specifically to do with perl dbi that will do it. You have to use a DB-specific query to get it. In MySQL, you'd run the query "SELECT LAST_INSERT_ID()" (maybe without the (). I ...