On Tue, 25 Nov 2008 11:47:10 +0530, "Satish"
<[EMAIL PROTECTED]> wrote in General Discussion of SQLite
Database <sqlite-users@sqlite.org>:

>Hi!
>You Said me to create the field as "INT PRIMARY KEY NOT NULL" instead of
>"INTEGER PRIMARY KEY NOT NULL".Even we spell differently they are working
>same.it is also auto incrementing.
>
>sqlite> create table dummytable (recid integer PRIMARY KEY NOT NULL,
>label text);
>sqlite> insert into dummytable (label) VALUES ('foo');
>sqlite> select * from dummytable;
>1|foo
>sqlite> create table secondtable (recid INT PRIMARY KEY NOT NULL, label
>text);
>sqlite> insert into secondtable (label) VALUES ('foo');
>1|foo
>I am not getting any constraint failed error

Hm, I do get it using the command line tool as downloaded a
few days ago: sqlite_version():3.6.6.1 

create table table1 (
        recid integer PRIMARY KEY NOT NULL, label text);
create table table2 (
        recid INT PRIMARY KEY NOT NULL, label text);
.bail OFF
insert into table1 (label) VALUES ('foo');
select * from table1;
1|foo
insert into table2 (label) VALUES ('foo');
SQL error near line 5: table2.recid may not be NULL
select * from table2;


Which version do you use?

>Regards,
>Satish.G
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to