One last thing I forgot to mention, on the topic of making INSERT and UPDATE easy -

If you are using SQLite 3.15 or later, you can use Row-value functionality to UPDATE several fields in one go from a sub query.

An example of how such an update query might look:

WITH CTE(ID, ta, tb, tc) AS (
    SELECT stuff...
)
UPDATE t SET (a, b, c) = (SELECT ta, tb, tc FROM CTE WHERE CTE.ID = t.ID)
;

INSERT of course can utilize a sub query or VALUES clause directly, which provide much the same functionality.

Read more here: http://sqlite.org/rowvalue.html

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to