SQLite Forum

Crash when a RETURNING clause refers to a table in UPDATE FROM
The RETURNING clause does not know about the alias name for the table being
deleted, inserted, or updated.  It only knows the canonical name of the table.
This is a known limitation.  I thought about
mentioning it in the list of limitations on the [RETURNING documentation page][1],
but I couldn't find a way to describe it that didn't seem like it would just
confuse people more.

This limitation might be relaxed in a future release.  But a major refactoring
will be required to accomplish that, so it would be inappropriate for a
patch release.

[1]: https://sqlite.org/lang_returning.html#limitations_and_caveats