Re: [sqlite] Can I use primary key field as a foreign key?
On 14 Nov 2013, at 2:16am, Igor Korotwrote: > Simon, > > On Wed, Nov 13, 2013 at 5:53 PM, Simon Slavin wrote: >> >> On 14 Nov 2013, at 12:53am, Igor Korot wrote: >> >>> Can I use the same field as both primary key and foreign key? >> >> Yes. Good idea, in fact. > > Is it documented anywhere - either on SQLite documentation or in a standard? Not that I know of. A foreign key involves two fields in different tables. I've done one way times. In fact almost all foreign keys relate to a primary key. The other way I don't think I've used but I see no reason why it shouldn't work. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Can I use primary key field as a foreign key?
Simon, On Wed, Nov 13, 2013 at 5:53 PM, Simon Slavinwrote: > > On 14 Nov 2013, at 12:53am, Igor Korot wrote: > >> Can I use the same field as both primary key and foreign key? > > Yes. Good idea, in fact. Is it documented anywhere - either on SQLite documentation or in a standard? Thank you for confirming. > > Simon. > ___ > 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
Re: [sqlite] Can I use primary key field as a foreign key?
On 14 Nov 2013, at 12:53am, Igor Korotwrote: > Can I use the same field as both primary key and foreign key? Yes. Good idea, in fact. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Can I use primary key field as a foreign key?
Hi, ALL, Can I use the same field as both primary key and foreign key? Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users