SQLite Forum

UPDATE x AS y: alias invalid in "SET" expr
Login
The following fails to parse:

    CREATE TABLE atable(id INTEGER);

    UPDATE atable AS a
    SET a.id = 2  -- HERE
    WHERE a.id = 1;

The "a.id" is not accepted in a SET expression even though it works in a WHERE expression. For consistency it would be nice if it did so. Has only become interesting to me since the UPDATE ... FROM support was added - I wanted to qualify all column names.

Version 3.34.0 2020-09-01 00:26:21 3ca0b7d54d73d07cd6b32e650a809174bb1cd66ce5ecdb36f65b70899ea05824