logo       

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

python.db.pysqlite.user

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

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