$sth = $dbh1->selectrow_array ( "SELECT * FROM `some_table_name` LIMIT 1"); if ($dbh1->errstr) { #Does not exist } else { # DOES exist }