On Sat Dec 16, 2017 at 07:53:22PM +0000, Nelson, Erik - 2 wrote: > For unfortunate reasons, I need a query that does an insert and also > returns at least one row... for example, something along the lines of > > Select 1 as value from (insert into table1 values(a, b, c)) > > Or > > Select coalesce((insert into table1 values(a, b, c)), 1) as value > > I've tried a number of options but haven't been able to get anything > to work. Is it possible?
How about a user defined function that does the insert in the background? SELECT my_insert(table_name, val1, val2); -- Mark Lawrence _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users