[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] Without ROWID and Autoincrement question
From:       Mohit Sindhwani <ml3p () onghu ! com>
Date:       2014-12-27 8:32:56
Message-ID: 549E6EB8.5010906 () onghu ! com
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic