On Mon, 27 Feb 2017 16:07:48 -0500 Richard Hipp <d...@sqlite.org> wrote:
> On 2/27/17, James K. Lowden <jklow...@schemamania.org> wrote: > > SQLite requires that foreign keys refer to primary > > keys. > > No it doesn't. Where did you get that impression? sqlite> create table A(a, b, primary key (a,b)); sqlite> create table C(c references A(a)); sqlite> insert into A values (1,2); sqlite> insert into C values (1); Error: foreign key mismatch - "C" referencing "A" sqlite> Clearly something about the primary key influences the evaluation of a referencing foreign key. Perhaps i should have said "whole primary key"? --jkl _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users