Re: [sqlite] NOT NULL integer primary key

2017-05-26 Thread James K. Lowden
On Fri, 26 May 2017 18:04:14 +0200 (CEST) Eric wrote: > Why should the INSERT return an error? It is quite OK to, when > inserting a row, not specify a value for a NOT NULL column - as long > as the DDL has specified some way of constructing a value. The SQL in question is >>>

Re: [sqlite] NOT NULL integer primary key

2017-05-26 Thread Eric
PRIMARY KEY NOT NULL" is valid standard SQL syntax, and it is OK to specify "NOT NULL", if only because the primary key specification might be lower down the statement, as a table constraint or even (though not in SQLite) in a subsequent separate statement. This gives the

Re: [sqlite] NOT NULL integer primary key

2017-05-19 Thread Keith Medcalf
On Thursday, 18 May, 2017 10:17, Paul Sanderson wrote: > Create table test (id integer not null primary key, data text); > insert into test values (null, 'row1'); > select * from test; > 1, row1 > I know that if you provide a NULL value to a column define as

Re: [sqlite] NOT NULL integer primary key

2017-05-18 Thread Paul Sanderson
Ahh being dull and in a hurry thanks Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work address for a fully functional demo

Re: [sqlite] NOT NULL integer primary key

2017-05-18 Thread Gwendal Roué
> Le 18 mai 2017 à 18:16, Paul Sanderson a écrit > : > > Is this a bug? > > Create table test (id integer not null primary key, data text); > insert into test values (null, 'row1'); > select * from test; > 1, row1 > > I know that if you provide a NULL value to a

[sqlite] NOT NULL integer primary key

2017-05-18 Thread Paul Sanderson
Is this a bug? Create table test (id integer not null primary key, data text); insert into test values (null, 'row1'); select * from test; 1, row1 I know that if you provide a NULL value to a column define as integer primary key that SQLite will provide a rowid, but should the not null