Actually, on SQLite, 'INTEGER PRIMARY KEY' does designate a special
type of autoincremented column.
The internal 64 bit rowid is used directly in that case, which is
essentially 'free' storage.
http://www.sqlite.org/faq.html#q1
http://www.sqlite.org/lang_createtable.html
http://www.sqlite.org/autoinc.html
-pmb
At 12:19 PM -0700 10/22/05, 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.
--
Mario Gutierrez
mario.l.gutierrez @ hotmail.com
From: "David M. Cook" <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to determine if a column is autoincremented?
Date: Sat, 22 Oct 2005 10:52:20 -0700
On Fri, Oct 21, 2005 at 05:38:28PM -0700, Mario Gutierrez wrote:
I'm writing a SQLite adapter for a code generation tool. I'm a little
stumped on how you query SQLite to determine if a column is
autoincremented. I've tried
An auto-increment column is defined as INTEGER PRIMARY KEY, so look for
primary key columns of type 'INTEGER'.
Dave Cook
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/