my $sql = "SELECT * FROM $tablePath WHERE 0 = 1"; my $sth = $dbh->prepare($sql); $sth->execute(); $sth->finish(); my $all_types = $sth->{TYPE};