drop table X if exists; #### sub tableExists { my ($dbh, $tableName) = @_; my $exists = 0; #my $cursor = $this->{dbh}->table_info('%','%',$tableName,'TABLE'); my $res = eval { my $cursor = $dbh->prepare("select * from $tableName where 1 = 0"); $cursor->execute(); $cursor->finish; 0E0 }; return defined $res; }