SQLite Forum

Update with table alias
I'm trying to execute the following query (it is valid in PostgreSQL) with the new returning syntax:

update demo as _new_ set name = 'Name 2' 
from (select * from demo as _old_ where _old_.id = 3) as _old_ 
where _new_.id = _old_.id 
returning _old_.name as oldName, _new_.name as newName

And I got the following error message:

no such column: _old_.name

Table creation:

create table demo(id number, name text)

It is like no table alias is valid in the returning clause. As far there is a table alias, there will be an error.

Tested on sqlite 3.36.0