On Sun, 09 May 2010 12:18:41 +0200, Oliver Lange
<[email protected]> wrote:
>
>Hello,
>
>One thing i'm missing in PRAGMA table_info() is that i can't specify
>a database name, like: PRAGMA table_info(main.mytable);
>
>Problem: if a TEMPORARY TABLE is defined using the same name as an
>already existing table in the main database (which SQLITE3 apparently
>allows), PRAGMA table_info() returns the info for the temporary table,
>while the table info for the original table in the main database can't
>be retrieved until the temporary table is deleted.
>
>Not that i'd create such a table, but i'd like to write a small wrapper
>function for fetching the table info, where the caller shall choose if
>the info shall be taken from either the main or temp db, or any other
>attached database for that matter.
>
>Shouldn't be too problematic to add sucha feature?
As a workaround, you can use:
select name from sqlite_master
where type='table';
select name from sqlite_temp_master
where type='table';
select name from attacheddb.sqlite_master
where type='table';
--
( Kees Nuyt
)
c[_]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users