Re: [sqlite] Efficient query of 2 related tables

2008-09-11 Thread P Kishor
On 9/11/08, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > P Kishor <[EMAIL PROTECTED]> wrote: > > why? Because INTEGER PRIMARY KEY already provides AUTOINCREMENT > > > There's a difference in using INTEGER PRIMARY KEY with and without > AUTOINCREMENT keyword: http://www.sqlite.org/autoinc.html > >

Re: [sqlite] Efficient query of 2 related tables

2008-09-11 Thread Igor Tandetnik
P Kishor <[EMAIL PROTECTED]> wrote: > why? Because INTEGER PRIMARY KEY already provides AUTOINCREMENT There's a difference in using INTEGER PRIMARY KEY with and without AUTOINCREMENT keyword: http://www.sqlite.org/autoinc.html Igor Tandetnik ___

Re: [sqlite] Efficient query of 2 related tables

2008-09-11 Thread Dennis Cote
Thomas DILIGENT wrote: > I have 2 tables: > > A: _ID autoinc primary key >name text >b integer foreign key to table B > > B: _ID autoinc primary key >name text > > In sql: > CREATE TABLE "A" ("_ID" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "name" > TEXT, "b" INTEGER NOT NULL

Re: [sqlite] Efficient query of 2 related tables

2008-09-11 Thread P Kishor
On 9/11/08, Thomas DILIGENT <[EMAIL PROTECTED]> wrote: > Hi, > > I have 2 tables: > > A: _ID autoinc primary key >name text >b integer foreign key to table B > > B: _ID autoinc primary key >name text > > In sql: > CREATE TABLE "A" ("_ID" INTEGER PRIMARY KEY AUTOINCREMENT NOT

[sqlite] Efficient query of 2 related tables

2008-09-11 Thread Thomas DILIGENT
Hi, I have 2 tables: A: _ID autoinc primary key name text b integer foreign key to table B B: _ID autoinc primary key name text In sql: CREATE TABLE "A" ("_ID" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "name" TEXT, "b" INTEGER NOT NULL DEFAULT '0') CREATE TABLE "B" ("_ID"