Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   [pysqlite] Equivalent for SHOW TABLES? (http://www.velocityreviews.com/forums/t345415-pysqlite-equivalent-for-show-tables.html)

F. GEIGER 05-27-2005 07:35 PM

[pysqlite] Equivalent for SHOW TABLES?
 
For now, the names of the tables, the app knows of, are added into an
internal list, when the app is started. Then, when queries fail, the app
knoes that it has to create them.

It would be nice somehow to be able to ask the database what tables it
contains. Is anyone doing this that way? How do you do that?

Kind regards
Franz GEIGER



madsurfer2000@hotmail.com 05-27-2005 10:18 PM

Re: [pysqlite] Equivalent for SHOW TABLES?
 
F. GEIGER wrote:
>
> It would be nice somehow to be able to ask the database what tables it
> contains. Is anyone doing this that way? How do you do that?
>

Information can be found in "Information_Schema_TABLES"

See:
http://www.sqlite.org/cvstrac/wiki?p=InformationSchema


Peter Hansen 05-27-2005 10:24 PM

Re: [pysqlite] Equivalent for SHOW TABLES?
 
F. GEIGER wrote:
> For now, the names of the tables, the app knows of, are added into an
> internal list, when the app is started. Then, when queries fail, the app
> knoes that it has to create them.
>
> It would be nice somehow to be able to ask the database what tables it
> contains. Is anyone doing this that way? How do you do that?


The query "select name from sqlite_master where type='table';" should do
something like that. (I found that info in the FAQ as answer #9.)

-Peter


All times are GMT. The time now is 11:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.