Re: [sqlite] Composite primary key with autoincrement

2011-02-16 Thread Drake Wilson
Quoth Maciej Lotkowski , on 2011-02-16 09:45:45 +0100: > It's not about the real use case. I understand, that having such a > primary key probably doesn't make much sense. I'm asking if it is > technically possible to create a table like > > create table foo ( > id

Re: [sqlite] Composite primary key with autoincrement

2011-02-16 Thread Maciej Lotkowski
On Wed, Feb 16, 2011 at 12:33 AM, Simon Slavin wrote: > Or to put it another way, if a column is autoincrement and you don't intend > to mess with the values manually, it's going to be unique anyway, so it makes > a good simple short primary key.  You may have good reasons

Re: [sqlite] Composite primary key with autoincrement

2011-02-15 Thread Simon Slavin
On 15 Feb 2011, at 11:28pm, Drake Wilson wrote: > Quoth Maciej Lotkowski , on 2011-02-15 23:28:01 > +0100: >> Is it possible to have composite primary key where one column is >> autoincrement? From what I found in docs it looks like it is possible >> to have either

Re: [sqlite] Composite primary key with autoincrement

2011-02-15 Thread Drake Wilson
Quoth Maciej Lotkowski , on 2011-02-15 23:28:01 +0100: > Is it possible to have composite primary key where one column is > autoincrement? From what I found in docs it looks like it is possible > to have either simple primary key on one autoincrement column or >

[sqlite] Composite primary key with autoincrement

2011-02-15 Thread Maciej Lotkowski
Hi Is it possible to have composite primary key where one column is autoincrement? From what I found in docs it looks like it is possible to have either simple primary key on one autoincrement column or composite PK on few columns without autoincrement. Am I right? If no, what is the syntax to