logo       

Re: Test if table is a table in sqlite db: msg#00003

python.db.pysqlite.user

Subject: Re: Test if table is a table in sqlite db

Many thanks Tim, this is just what I was looking for!

Regards,
David

Tim Golden wrote:
> David Pratt wrote:
>> Hi. I am looking to test whether a table is in an sqlite database.
>> What is the name of the table. In postgres this would be a lookup in
>> pg_tables. Many thanks.
>
> sqlite_master
>
> SQLite version 3.3.5
> Enter ".help" for instructions
> sqlite> .schema sqlite_master
> CREATE TABLE sqlite_master (
> type text,
> name text,
> tbl_name text,
> rootpage integer,
> sql text
> );
> sqlite>
>
> TJG
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise