my $sql = "SELECT last_insert_rowid() FROM tbl";