in reply to DBI: checking if a table exists in a cross-DB manner?
You should use the $dbh->table_info(...) method.
It will return a statement handle, that iterates the table(s) you define, thus alloowing easy check whether a table exists.
Your call would be something like
This will work on all DBD's (as soon as the authors have implemented the table_info method - most have). If yours doesn't work, then please contact your DBD-author and help him get it done.$sth=$dbh->table_info("", $schema, $table_name, "TABLE"); if ($sth->fetch) { # table exists } else { # doesn't }
In Section
Seekers of Perl Wisdom