This is not true. You can only get the constraints from sqlite_master by parsing the table creation sql statements.
constraints are not added independantly to sqlite_master -- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı > -----Original Message----- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of J. King > Sent: Monday, 3 July, 2017 07:51 > To: SQLite mailing list > Subject: Re: [sqlite] FOREING KEY constraint > > The sqlite_master table should have this information. > > SELECT count() FROM sqlite_master WHERE name IS your_constraint_name AND > tbl_name IS your_table_name; > > On July 3, 2017 9:37:04 AM EDT, Igor Korot <ikoro...@gmail.com> wrote: > >Hi, Keith et al, > > > >On Mon, Jul 3, 2017 at 7:13 AM, Keith Medcalf <kmedc...@dessus.com> > >wrote: > >> > >> From what I can tell the answer is (A). The constraint_name is > >simply a comment to be reported (if possible) when the constraint is > >violated. > > > >So is it possible to check that the foreign key with the given name > >already present for a given > >table? > > > >Thank you. > > > >> > >> -- > >> ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı > >> > >>> -----Original Message----- > >>> From: sqlite-users > >[mailto:sqlite-users-boun...@mailinglists.sqlite.org] > >>> On Behalf Of Simon Slavin > >>> Sent: Monday, 3 July, 2017 04:49 > >>> To: SQLite mailing list > >>> Subject: Re: [sqlite] FOREING KEY constraint > >>> > >>> > >>> > >>> On 3 Jul 2017, at 4:37am, Keith Medcalf <kmedc...@dessus.com> wrote: > >>> > >>> > What do you mean "check for uniqueness? > >>> > >>> If you give two constraints the same name, does SQLite > >>> > >>> A) Ignore the problem > >>> B) Reject the second one complaining "duplicate name" > >>> C) Replace the first one with the second > >>> > >>> Simon. > >>> _______________________________________________ > >>> sqlite-users mailing list > >>> sqlite-users@mailinglists.sqlite.org > >>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > >> > >> > >> > >> _______________________________________________ > >> sqlite-users mailing list > >> sqlite-users@mailinglists.sqlite.org > >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > >_______________________________________________ > >sqlite-users mailing list > >sqlite-users@mailinglists.sqlite.org > >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users