Re: [sqlite] Without ROWID and Autoincrement question

2014-12-27 Thread Mohit Sindhwani

On 27/12/2014 12:13 AM, Teg wrote:

Because AUTOINCREMENT keyword changes the behavior of the ROWID
selection algorithm, AUTOINCREMENT is not allowed on WITHOUT ROWID
tables or on any table column other than INTEGER PRIMARY KEY. Any
attempt to use AUTOINCREMENT on a WITHOUT ROWID table or on a column
other than the INTEGER PRIMARY KEY column results in an error.--

I think this comment would be clearer if the "without rowid" part was
pulled out and made absolute.



The AUTOINCREMENT keyword is not allowed on WITHOUT ROWID tables.
Because the AUTOINCREMENT keyword changes the behavior of the ROWID
selection algorithm, Any attempt to use AUTOINCREMENT on a column
other than the INTEGER PRIMARY KEY column results in an error.--



I think this misses the point that if you try to apply it on a WITHOUT 
ROWID table, you will get an error.  Here's my attempt at reqriting 
thetext...


The AUTOINCREMENT keyword changes the behavior of the ROWID selection 
algorithm and is only allowed on the INTEGER PRIMARY KEY column and   
Consequently, any attempt to use AUTOINCREMENT on WITHOUT ROWID tables 
or on a column other than the INTEGER PRIMARY KEY column results in an 
error.


Best Regards,
Mohit.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Without ROWID and Autoincrement question

2014-12-26 Thread Teg
Hello General,

I  was  going  to say I thought the docs were ambiguous but, on my 3rd
reading  I  see  they  aren't.  Still,  I think this statement could be
re-written to reduce confusion (at least mine).

https://www.sqlite.org/autoinc.html

>>Because AUTOINCREMENT keyword changes the behavior of the ROWID
>>selection algorithm, AUTOINCREMENT is not allowed on WITHOUT ROWID
>>tables or on any table column other than INTEGER PRIMARY KEY. Any
>>attempt to use AUTOINCREMENT on a WITHOUT ROWID table or on a column
>>other than the INTEGER PRIMARY KEY column results in an error.--

I think this comment would be clearer if the "without rowid" part was
pulled out and made absolute.


>>The AUTOINCREMENT keyword is not allowed on WITHOUT ROWID tables.
>>Because the AUTOINCREMENT keyword changes the behavior of the ROWID
>>selection algorithm, Any attempt to use AUTOINCREMENT on a column
>>other than the INTEGER PRIMARY KEY column results in an error.--



Best regards,
 Conrad  mailto:t...@djii.com

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users