I am using Perl DBI. I know that $dbase->tables()
will return all the tables in the corresponding database. Likewise, I want to know the schemas available in the database. Is there any function available for that?
What you're looking for is: DBI->table_info()
Call it like this:
my $sth = $dbh->table_info('', '%', '');
my $schemas = $dbh->selectcol_arrayref($sth, {Columns => [2]});
print "Schemas: ", join ', ', @$schemas;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With