On Mon, 15 Dec 2008 11:24:30 +0000, "Nathan Catlow"
<[email protected]> wrote in General Discussion of SQLite
Database <[email protected]>:

>PRAGMA table_info(t);
>PRAGMA index_list(t);
>
>Both those give me no love.

Try:

sqlite> select * from sqlite_sequence;

name           seq
-------------  ----------
sometablename  4

Every table with an INTEGER PRIMARY KEY AUTOINDEX
declaration is registerd there, one row per table.
You only have to consult sqlite_sequence if PRAGMA
table_info() returns 'INTEGER' for type and 1 for pk.

>I suppose if i wrote my own autoincrement all this
>would go away as I could ensure its length.

SQLite is an embedded database, not a generic RDBMS backend
engine, and doesn't have strong typing. It assumes the
application (anything that calls the SQLite library) knows
the database schema. That may make life a bit harder for
generic wrapper libraries and database management tools.
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to