Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

DBI: checking if a table exists in a cross-DB manner?

by radiantmatrix (Parson)
on Dec 02, 2004 at 19:54 UTC ( [id://411923]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub _recreate_table {
       my $table_name = shift;
       drop_table($table_name) if table_exists($table_name);
       create_table($table_name, %schema); 
    }
    
  2. or download this
    $dbh->{RaiseError} = 1;
    eval { $sth->do("DROP TABLE $table_name") };
    if ($@) {
       ## Do nothing
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://411923]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found