in reply to Re: sqlite show tables
in thread sqlite show tables

Is it possible to execute .schema from the DBI or is it a cli client only thing?

Replies are listed 'Best First'.
Re^3: sqlite show tables
by dsheroh (Monsignor) on Jul 20, 2021 at 07:25 UTC
    I don't actually know. I've never tried using .schema (or show tables with mysql) in DBI code, only in the interactive clients. When I've wanted to get a database's list of tables from DBI code, I've done it with my @tables = $dbh->tables(undef, undef, undef, 'TABLE'); (Documentation)
      Hm, looks like, they've marked it (->tables) as deprecated.

        You have misread the documentation. Only calling tables with no arguments is deprecated.


        🦛