Hi Clemens,

Thanks for your reply.  I've tried to use raw SQL but it didn't work
either.  Do you have any SQLite front-end that you use?


Regards,
Chris

On Tue, Feb 9, 2016 at 11:12 AM, Clemens Ladisch <clemens at ladisch.de> wrote:
> Chris Prakoso wrote:
>> My question is whether anybody had successfully implemented multiple
>> rows Insert/Update.
>
> This is possible in SQL:
>
> INSERT INTO MyTable(ID, Value)
> VALUES (1, 'hello'),
>        (2, 'world');
>
> UPDATE MyTable
> SET Value = 'the same value'
> WHERE ID IN (1, 2);
>
> -- rather verbose; better use two simple UPDATEs:
> UPDATE MyTable
> SET Value = CASE ID
>             WHEN 1 THEN 'new A'
>             WHEN 2 THEN 'new B'
>             END
> WHERE ID IN (1, 2);
>
>
> Regards,
> Clemens
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to