See http://www.sqlite.org/autoinc.html - INTEGER PRIMARY KEY will autoincrement only until you delete a row from the table.
-Tom > -----Original Message----- > From: Mario Gutierrez [mailto:[EMAIL PROTECTED] > Sent: Monday, October 24, 2005 11:05 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] How to determine if a column is autoincremented? > > You learn something new everyday. I didn't know that was the > behaviour of > INTEGER PRIMARY KEY. All other databases I've worked with > require you to > explicitly declare an identiy/autoincrement column. I was > strictly looking > at the metadata returned by PRAGMA. SQLite is certainly a > different breed of > cat. > > Thanks for the tip. Anyway, if anyone out there uses > CodeSmith, I uploaded > the SQLite schema provider. > > -- > Mario Gutierrez > mario.l.gutierrez @ hotmail.com > > > > > >From: Peter Bierman <[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: Sun, 23 Oct 2005 23:20:19 -0700 > > > >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/ > > > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN Search! > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > >