> > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > On Behalf Of Clemens Ladisch
> > Sent: Monday, 3 July, 2017 08:00
> > To: sqlite-users@mailinglists.sqlite.org
> > Subject: Re: [sqlite] FOREING KEY constraint
> >
> > J. King wrote
Ladisch
> Sent: Monday, 3 July, 2017 08:00
> To: sqlite-users@mailinglists.sqlite.org
> Subject: Re: [sqlite] FOREING KEY constraint
>
> J. King wrote:
> > The sqlite_master table should have this information.
> >
> > SELECT count() FROM sqlite_master WHERE
qlite-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
J. King wrote:
> 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;
Constraints do not have separate entries in the sqlite_master table.
And there is no other mechanism to get this infor
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
>
day, 3 July, 2017 04:49
>> To: SQLite mailing list
>> Subject: Re: [sqlite] FOREING KEY constraint
>>
>>
>>
>> On 3 Jul 2017, at 4:37am, Keith Medcalf wrote:
>>
>> > What do you mean "check for uniqueness?
>>
>> If you give two
-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 wrote:
>
> > What do you mean "check for uniquenes
On 3 Jul 2017, at 4:37am, Keith Medcalf 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.
See https://sqlite.org/lang_createtable.html
--
˙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 Igor Korot
> Sent: Sunday, 2 July, 2017 21:12
> To: Discussion of SQLite Dat
Yes.
CREATE TABLE Parent
(
id INTEGER PRIMARY KEY,
data TEXT COLLATE NOCASE,
CONSTRAINT unique_data UNIQUE (data)
);
CREATE TABLE Child
(
id INTEGER PRIMARY KEY,
parent INTEGER CONSTRAINT child_to_parent REFERENCES Parent(id)
);
or
CREATE TABLE Child
(
id INTEGER PRIMARY KEY,
par
10 matches
Mail list logo