I’m trying to add SQLite’s ‘RETURNING’ keyword to an insert query that uses placeholders and is ran via command.ExecuteScalar(). The current query, with command.Parameters values shown explicitly, looks as such:
INSERT INTO TABLE (column, column, ...)
VALUES (?, ?, ?, ...)
(value, value, ...)
I’ve tried appending ‘RETURNING id’ to the query itself, but then command.executeScalar() runs:
INSERT INTO TABLE (column, column, ...)
VALUES (?, ?, ?, ...)
RETURNING id
(value, value, ...)
I’ve tried taking the command, after creation and parameter addition, and using it to make a new command with the appended ‘RETURNING id’, but that doesn’t bring the parameters with it.
Any help would be much appreciated! 🙂
12