SQLite Forum

Use of RETURNING clause as a subquery
Login
Possibly. The type specification "serial" is interpreted as numeric affinity, so it is distinct from the rowid. It's default value would be NULL, but due to a historical oversight, SQLite should accept a NULL in the primary key.

Edit: And UNION ALL does not discard duplicate values. Using UNION may just insert two records but return only one value...