SQLite Forum

Feature Request: DML RETURNING clause
Login
> It doesn't really add any new capabilities but it does cut down on verbosity

That it doesn't add new capabilities is actually somewhat debatable:

* the official documentation indicates that [last_insert_rowid](https://sqlite.org/c3ref/last_insert_rowid.html) is not thread-safe even (I assume even when the connection is)
* because of the `ON CONFLICT` clause, it may be difficult to know what records were affected by an `INSERT` as inserting N records may not lead to the last N records of the table having been inserted, AFAIK there is no way to know which records were inserted and which were ignored or updated

Supporting a `RETURNING` clause would make these scenarios workable.