Everything downloaded correctly, but there is still something wrong. Perhaps 
my very short experience in SQL resulted in any statement mistake.
Let me show again how the tables are created and the data inserted:

create table cities
(
id integer primary key not null,
name text not null
);

create table people
(
id integer primary key not null,
name text not null,
cities_id integer not null,
foreign key(cities_id) references cities(id)
);

insert into cities(name) values('Campos');
insert into cities(name) values('Araraquara');
insert into cities(name) values('Porto');
insert into cities(name) values('Curitiba');
insert into people(name, cities_id) values('John', 3);
insert into people(name, cities_id) values('Mary', 2);

Regarding cities don't have the Id = 8, this statement should fail:
insert into people(name, cities_id) values('Pedro', 8);
Unexplainably, the record is added despite the constraint.
What am I doing wrong?

----- Original Message ----- 
From: "Jean-Christophe Deschamps" <j...@q-e-d.org>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Sunday, January 03, 2010 2:09 PM
Subject: Re: [sqlite] Foreign key support in Sqlite


> Hi,
>
>>I am trying to migrate to Sqlite3.6.21. I visited the Sqlite site and
>>downloaded the compiled file. I'm surprised in verifying that the zip
>>only had the executable. I hoped to find also the DLL.
>
> I bet you downloaded this: http://www.sqlite.org/sqlite-3_6_21.zip
>
> This is the CLI, he command-line interface.
>
>
> You need to donload this as well:
> http://www.sqlite.org/sqlitedll-3_6_21.zip
>
> This is the windows 32 dll file.
>
>
> Happy New SQLite
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to