SQLite Forum

Crash when a RETURNING clause refers to a table in UPDATE FROM
Login
Note the following perhaps simpler test case:

```
sqlite> create table x(a,b);
sqlite> create table y(c,d);
sqlite> update x set a=c from y where b=d returning *;
```

works just fine, but using a wildcard qualified table reference crashes:

```
sqlite> create table x(a,b);
sqlite> create table y(c,d);
sqlite> update x set a=c from y where b=d returning x.*;
```
```
sqlite> create table x(a,b);
sqlite> create table y(c,d);
sqlite> update x set a=c from y where b=d returning y.*;
```

Note that this gives an error:

```
sqlite> create table x(a,b);
sqlite> create table y(c,d);
sqlite> update x set a=c from y where b=d returning x.a, y.d;
Error: no such column: y.d
```

Does the returning clause permit returning values not from the updated table?