Re: [sqlite] AUTO_INCREMENT error

2012-08-04 Thread Keith Medcalf
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

Re: [sqlite] AUTO_INCREMENT error

2012-08-04 Thread Brandon Pimenta
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>

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Keith Medcalf
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

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Yuriy Kaminskiy
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

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Igor Tandetnik
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

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread 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

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Simon Slavin
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

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Brandon Pimenta
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

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Kees Nuyt
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?

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Igor Tandetnik
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

Re: [sqlite] AUTO_INCREMENT error

2012-08-03 Thread Rob Richardson
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

[sqlite] AUTO_INCREMENT error

2012-08-03 Thread Brandon Pimenta
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