On 7/9/18, R Smith wrote:
> a - Does it affect the UPSERT statement's ON CONFLICT clause? i.e. does
> INSERT ON CONFLICT... trigger the conflict resolution when the
> CHECK fails?
No UPSERT only works for uniqueness constraints (UNIQUE or PRIMARY KEY).
> b - If so, would it be real hard
On 2018/07/10 12:53 AM, Richard Hipp wrote:
CREATE TABLE t1(x INT, CHECK(x!=5) ON CONFLICT IGNORE);
However, the parser silently discards the ON CONFLICT clause. I think
this has always been the case.
Well, I feel embarrassed, I have used this CHECK conflict clause a good
number of times
On 7/9/18, Thomas Kurz wrote:
> Hello,
>
> is there a way to have Sqlite ignore check violations?
>
> I would like to do:
>
> CREATE TABLE (name TEXT NOT NULL CHECK (name<>'') ON CONFLICT IGNORE
>
> but the "on conflict" is not accepted here.
It does not appear that SQLite has ever acted
On 9 Jul 2018, at 10:21pm, Thomas Kurz wrote:
> However, this is a bit confusing as e.g. this works fine:
>
> CREATE TABLE test (col1 TEXT UNIQUE ON CONFLICT IGNORE);
There is actually a way to do what you want. You do it with a TRIGGER which
does the test and drops the offending row using
On 9 Jul 2018, at 10:21pm, Thomas Kurz wrote:
> However, this is a bit confusing as e.g. this works fine:
>
> CREATE TABLE test (col1 TEXT UNIQUE ON CONFLICT IGNORE);
By 'works fine' do you mean you didn't get a syntax error, or do you mean that
the clause actually does what you want, both to
> Yes. The ON CONFLICT clause goes in the INSERT command.
Ok, thank you very much.
However, this is a bit confusing as e.g. this works fine:
CREATE TABLE test (col1 TEXT UNIQUE ON CONFLICT IGNORE);
May I suggest the appropriate extension for CHECK ON CONFLICT IGNORE or is
there a thoughtful
On 9 Jul 2018, at 10:00pm, Thomas Kurz wrote:
> I get a "syntax error near on":
> CREATE TABLE test (col1 TEXT CHECK (col1<>'') ON CONFLICT IGNORE);
>
> Am I using a wrong syntax?
Yes. The ON CONFLICT clause goes in the INSERT command.
CREATE TABLE test (col1 TEXT CHECK (col1<>''));
ind regards,
Thomas
- Original Message -
From: Richard Hipp
To: SQLite mailing list
Sent: Monday, July 9, 2018, 22:03:29
Subject: [sqlite] CHECK IGNORE?
On 7/9/18, Thomas Kurz wrote:
> is there a way to have Sqlite ignore check violations?
https://www.sqlite.org/pragma.html#p
On 7/9/18, Thomas Kurz wrote:
> is there a way to have Sqlite ignore check violations?
>
https://www.sqlite.org/pragma.html#pragma_ignore_check_constraints
--
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
Hello,
is there a way to have Sqlite ignore check violations?
I would like to do:
CREATE TABLE (name TEXT NOT NULL CHECK (name<>'') ON CONFLICT IGNORE
but the "on conflict" is not accepted here.
___
sqlite-users mailing list
10 matches
Mail list logo