I suspect I have found a parsing error in SQLite 3.30.1. Given the
following:

    CREATE TABLE t1(a INTEGER PRIMARY KEY);

The following statement is accepted by the parser:

    INSERT INTO t1 AS original (a) VALUES(1)
      ON CONFLICT DO NOTHING;

However if I wrap it inside a trigger:

    CREATE TABLE t2(b INTEGER);

    CREATE TRIGGER t2_ai
    AFTER INSERT ON t2
    FOR EACH ROW BEGIN

        INSERT INTO t1 AS original (a) VALUES(NEW.b)
          ON CONFLICT DO NOTHING;

    END;

Then SQLite fails to prepare: near "AS": syntax error [for Statement
"CREATE TRIGGER...."]

-- 
Mark Lawrence
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to