SQLite Forum

Column name includes quotes used in RETURNING expr
Login
In normal SQLite SELECT use, quotes for identifiers are not included in column names (`sqlite3_column_name`).  However, when used in RETURNING, quotes are included in when used in the expr in RETURNING, but not when used as the column-alias:

```
$ sqlite3
SQLite version 3.35.5 2021-04-19 18:32:05
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .headers on
sqlite> CREATE TABLE a (t INTEGER);
sqlite> INSERT INTO a VALUES (1) RETURNING `t`;
`t`
1
sqlite> SELECT `t` FROM a;
t
1
sqlite> INSERT INTO a VALUES (1) RETURNING "t";
"t"
1
sqlite> INSERT INTO a VALUES (1) RETURNING "t" AS `t`;
t
1
```