On Sat, Oct 22, 2005 at 12:19:04PM -0700, Mario Gutierrez wrote:
> Thanks for the reply.
> 
> This would not work as I could define a table like this
> 
> CRETE TABLE my_table (
>  id INTEGER PRIMARY KEY,
>  ...
> )
> 
> This would meet your criteria, but 'id' is not an autoincremented column.

OK, now I think I get it: you're using an explicit AUTOINCREMENT keyword

INTEGER PRIMARY KEY AUTOINCREMENT

Since you can't have more than one PRIMARY KEY per table, you can combine
Kurt and my suggestions: look for primary key columns of type 'INTEGER' and
check for AUTOINCREMENT in the table definition (it can't appear without the
INTEGER PRIMARY KEY part).  However, it's an autoincrement column whether
the AUTOINCREMENT keyword is present or not.

But certainly having this returned from the table_info PRAGMA would be
nicer.

Dave Cook

Reply via email to