ta
> Sent: Saturday, 04 August, 2012 08:28
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] AUTO_INCREMENT error
>
> Thank you for this advice!
>
> On Fri, Aug 3, 2012 at 9:24 PM, Keith Medcalf <kmedc...@dessus.com> wrote:
>
> >
> > Th
On Behalf Of Simon Slavin
> > Sent: Friday, 03 August, 2012 10:00
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] AUTO_INCREMENT error
> >
> >
> > On 3 Aug 2012, at 4:53pm, Brandon Pimenta <brandonskypime...@gmail.com>
nal Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Simon Slavin
> Sent: Friday, 03 August, 2012 10:00
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] AUTO_INCREMENT error
>
>
> On 3 Aug 2
Igor Tandetnik wrote:
> Brandon Pimenta wrote:
>> CREATE TABLE test (
>> test_1 INTEGER PRIMARY KEY NOT NULL AUTOINCREMENT
>> );
>
> Make it
>
> INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
>
> Though NOT NULL is redundant - PRIMARY KEY implies it.
Unlike other sql
Simon Slavin wrote:
> All INTEGER PRIMARY KEY columns automatically have AUTOINCREMENT. You should
> not specify it yourself.
There's a subtle difference in behavior with and without AUTOINCREMENT keyword.
See
http://www.sqlite.org/autoinc.html
--
Igor Tandetnik
Brandon Pimenta wrote:
> CREATE TABLE test (
> test_1 INTEGER PRIMARY KEY NOT NULL AUTOINCREMENT
> );
Make it
INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
Though NOT NULL is redundant - PRIMARY KEY implies it.
--
Igor Tandetnik
On 3 Aug 2012, at 4:53pm, Brandon Pimenta wrote:
> When using the SQL query
>
> CREATE TABLE test (
> test_1 INTEGER PRIMARY KEY NOT NULL AUTOINCREMENT
> );
>
> or
>
> CREATE TABLE test (
> test_1 INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT
> );
>
> I will get
When using the SQL query
CREATE TABLE test (
test_1 INTEGER PRIMARY KEY NOT NULL AUTOINCREMENT
);
or
CREATE TABLE test (
test_1 INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT
);
I will get the same error.
On Fri, Aug 3, 2012 at 12:46 PM, Kees Nuyt wrote:
> On Fri, 3 Aug 2012
On Fri, 3 Aug 2012 10:08:56 -0300, Brandon Pimenta
wrote:
>I cannot use AUTO_INCREMENT. Here's my query:
>
>CREATE TABLE test (
>test_1 NOT NULL AUTO_INCREMENT
>);
>
>Running this query gives me "SQL error: near "AUTO_INCREMENT": syntax
>error". What does this mean?
Brandon Pimenta wrote:
> I cannot use AUTO_INCREMENT. Here's my query:
>
> CREATE TABLE test (
> test_1 NOT NULL AUTO_INCREMENT
> );
First, it's AUTOINCREMENT, without underscore. Second, it can only appear after
PRIMARY KEY.
> Running this query gives me "SQL
Don't you have to specify a column type for test_1?
RobR
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Brandon Pimenta
Sent: Friday, August 03, 2012 9:09 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] AUTO_INCREMENT
I cannot use AUTO_INCREMENT. Here's my query:
CREATE TABLE test (
test_1 NOT NULL AUTO_INCREMENT
);
Running this query gives me "SQL error: near "AUTO_INCREMENT": syntax
error". What does this mean?
SQLite 3.6.12
___
sqlite-users mailing list
12 matches
Mail list logo